<!doctype html><html lang="en">
 <head>
  <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  <title>WebUSB API</title>
  <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
<style data-fill-with="stylesheet">/******************************************************************************
 *                   Style sheet for the W3C specifications                   *
 *
 * Special classes handled by this style sheet include:
 *
 * Indices
 *   - .toc for the Table of Contents (<ol class="toc">)
 *     + <span class="secno"> for the section numbers
 *   - #toc for the Table of Contents (<nav id="toc">)
 *   - ul.index for Indices (<a href="#ref">term</a><span>, in §N.M</span>)
 *   - table.index for Index Tables (e.g. for properties or elements)
 *
 * Structural Markup
 *   - table.data for general data tables
 *     -> use 'scope' attribute, <colgroup>, <thead>, and <tbody> for best results !
 *     -> use <table class='complex data'> for extra-complex tables
 *     -> use <td class='long'> for paragraph-length cell content
 *     -> use <td class='pre'> when manual line breaks/indentation would help readability
 *   - dl.switch for switch statements
 *   - ol.algorithm for algorithms (helps to visualize nesting)
 *   - .figure and .caption (HTML4) and figure and figcaption (HTML5)
 *     -> .sidefigure for right-floated figures
 *   - ins/del
 *
 * Code
 *   - pre and code
 *
 * Special Sections
 *   - .note       for informative notes             (div, p, span, aside, details)
 *   - .example    for informative examples          (div, p, pre, span)
 *   - .issue      for issues                        (div, p, span)
 *   - .assertion  for assertions                    (div, p, span)
 *   - .advisement for loud normative statements     (div, p, strong)
 *   - .annoying-warning for spec obsoletion notices (div, aside, details)
 *
 * Definition Boxes
 *   - pre.def   for WebIDL definitions
 *   - table.def for tables that define other entities (e.g. CSS properties)
 *   - dl.def    for definition lists that define other entitles (e.g. HTML elements)
 *
 * Numbering
 *   - .secno for section numbers in .toc and headings (<span class='secno'>3.2</span>)
 *   - .marker for source-inserted example/figure/issue numbers (<span class='marker'>Issue 4</span>)
 *   - ::before styled for CSS-generated issue/example/figure numbers:
 *     -> Documents wishing to use this only need to add
 *        figcaption::before,
 *        .caption::before { content: "Figure "  counter(figure) " ";  }
 *        .example::before { content: "Example " counter(example) " "; }
 *        .issue::before   { content: "Issue "   counter(issue) " ";   }
 *
 * Header Stuff (ignore, just don't conflict with these classes)
 *   - .head for the header
 *   - .copyright for the copyright
 *
 * Miscellaneous
 *   - .overlarge for things that should be as wide as possible, even if
 *     that overflows the body text area. This can be used on an item or
 *     on its container, depending on the effect desired.
 *     Note that this styling basically doesn't help at all when printing,
 *     since A4 paper isn't much wider than the max-width here.
 *     It's better to design things to fit into a narrower measure if possible.
 *   - js-added ToC jump links (see fixup.js)
 *
 ******************************************************************************/

/******************************************************************************/
/*                                   Body                                     */
/******************************************************************************/

	body {
		counter-reset: example figure issue;

		/* Layout */
		max-width: 50em;               /* limit line length to 50em for readability   */
		margin: 0 auto;                /* center text within page                     */
		padding: 1.6em 1.5em 2em 50px; /* assume 16px font size for downlevel clients */
		padding: 1.6em 1.5em 2em calc(26px + 1.5em); /* leave space for status flag     */

		/* Typography */
		line-height: 1.5;
		font-family: sans-serif;
		widows: 2;
		orphans: 2;
		word-wrap: break-word;
		overflow-wrap: break-word;
		hyphens: auto;

		/* Colors */
		color: black;
		background: white top left fixed no-repeat;
		background-size: 25px auto;
	}


/******************************************************************************/
/*                         Front Matter & Navigation                          */
/******************************************************************************/

/** Header ********************************************************************/

	div.head { margin-bottom: 1em }
	div.head hr { border-style: solid; }

	div.head h1 {
		font-weight: bold;
		margin: 0 0 .1em;
		font-size: 220%;
	}

	div.head h2 { margin-bottom: 1.5em;}

/** W3C Logo ******************************************************************/

	.head .logo {
		float: right;
		margin: 0.4rem 0 0.2rem .4rem;
	}

	.head img[src*="logos/W3C"] {
		display: block;
		border: solid #1a5e9a;
		border-width: .65rem .7rem .6rem;
		border-radius: .4rem;
		background: #1a5e9a;
		color: white;
		font-weight: bold;
	}

	.head a:hover > img[src*="logos/W3C"],
	.head a:focus > img[src*="logos/W3C"] {
		opacity: .8;
	}

	.head a:active > img[src*="logos/W3C"] {
		background: #c00;
		border-color: #c00;
	}

	/* see also additional rules in Link Styling section */

/** Copyright *****************************************************************/

	p.copyright,
	p.copyright small { font-size: small }

/** Back to Top / ToC Toggle **************************************************/

	@media print {
		#toc-nav {
			display: none;
		}
	}
	@media not print {
		#toc-nav {
			position: fixed;
			z-index: 2;
			bottom: 0; left: 0;
			margin: 0;
			min-width: 1.33em;
			border-top-right-radius: 2rem;
			box-shadow: 0 0 2px;
			font-size: 1.5em;
			color: black;
		}
		#toc-nav > a {
			display: block;
			white-space: nowrap;

			height: 1.33em;
			padding: .1em 0.3em;
			margin: 0;

			background: white;
			box-shadow: 0 0 2px;
			border: none;
			border-top-right-radius: 1.33em;
			background: white;
		}
		#toc-nav > #toc-jump {
			padding-bottom: 2em;
			margin-bottom: -1.9em;
		}

		#toc-nav > a:hover,
		#toc-nav > a:focus {
			background: #f8f8f8;
		}
		#toc-nav > a:not(:hover):not(:focus) {
			color: #707070;
		}

		/* statusbar gets in the way on keyboard focus; remove once browsers fix */
		#toc-nav > a[href="#toc"]:not(:hover):focus:last-child {
			padding-bottom: 1.5rem;
		}

		#toc-nav:not(:hover) > a:not(:focus) > span + span {
			/* Ideally this uses :focus-within on #toc-nav */
			display: none;
		}
		#toc-nav > a > span + span {
			padding-right: 0.2em;
		}

		#toc-toggle-inline {
			vertical-align: 0.05em;
			font-size: 80%;
			color: gray;
			color: hsla(203,20%,40%,.7);
			border-style: none;
			background: transparent;
			position: relative;
		}
		#toc-toggle-inline:hover:not(:active),
		#toc-toggle-inline:focus:not(:active) {
			text-shadow: 1px 1px silver;
			top: -1px;
			left: -1px;
		}

		#toc-nav :active {
			color: #C00;
		}
	}

/** ToC Sidebar ***************************************************************/

	/* Floating sidebar */
	@media screen {
		body.toc-sidebar #toc {
			position: fixed;
			top: 0; bottom: 0;
			left: 0;
			width: 23.5em;
			max-width: 80%;
			max-width: calc(100% - 2em - 26px);
			overflow: auto;
			padding: 0 1em;
			padding-left: 42px;
			padding-left: calc(1em + 26px);
			background: inherit;
			background-color: #f7f8f9;
			z-index: 1;
			box-shadow: -.1em 0 .25em rgba(0,0,0,.1) inset;
		}
		body.toc-sidebar #toc h2 {
			margin-top: .8rem;
			font-variant: small-caps;
			font-variant: all-small-caps;
			text-transform: lowercase;
			font-weight: bold;
			color: gray;
			color: hsla(203,20%,40%,.7);
		}
		body.toc-sidebar #toc-jump:not(:focus) {
			width: 0;
			height: 0;
			padding: 0;
			position: absolute;
			overflow: hidden;
		}
	}
	/* Hide main scroller when only the ToC is visible anyway */
	@media screen and (max-width: 28em) {
		body.toc-sidebar {
			overflow: hidden;
		}
	}

	/* Sidebar with its own space */
	@media screen and (min-width: 78em) {
		body:not(.toc-inline) #toc {
			position: fixed;
			top: 0; bottom: 0;
			left: 0;
			width: 23.5em;
			overflow: auto;
			padding: 0 1em;
			padding-left: 42px;
			padding-left: calc(1em + 26px);
			background: inherit;
			background-color: #f7f8f9;
			z-index: 1;
			box-shadow: -.1em 0 .25em rgba(0,0,0,.1) inset;
		}
		body:not(.toc-inline) #toc h2 {
			margin-top: .8rem;
			font-variant: small-caps;
			font-variant: all-small-caps;
			text-transform: lowercase;
			font-weight: bold;
			color: gray;
			color: hsla(203,20%,40%,.7);
		}

		body:not(.toc-inline) {
			padding-left: 29em;
		}
		/* See also Overflow section at the bottom */

		body:not(.toc-inline) #toc-jump:not(:focus) {
			width: 0;
			height: 0;
			padding: 0;
			position: absolute;
			overflow: hidden;
		}
	}
	@media screen and (min-width: 90em) {
		body:not(.toc-inline) {
			margin: 0 4em;
		}
	}

/******************************************************************************/
/*                                Sectioning                                  */
/******************************************************************************/

/** Headings ******************************************************************/

	h1, h2, h3, h4, h5, h6, dt {
		page-break-after: avoid;
		page-break-inside: avoid;
		font: 100% sans-serif;   /* Reset all font styling to clear out UA styles */
		font-family: inherit;    /* Inherit the font family. */
		line-height: 1.2;        /* Keep wrapped headings compact */
		hyphens: manual;         /* Hyphenated headings look weird */
	}

	h2, h3, h4, h5, h6 {
		margin-top: 3rem;
	}

	h1, h2, h3 {
		color: #005A9C;
		background: transparent;
	}

	h1 { font-size: 170%; }
	h2 { font-size: 140%; }
	h3 { font-size: 120%; }
	h4 { font-weight: bold; }
	h5 { font-style: italic; }
	h6 { font-variant: small-caps; }
	dt { font-weight: bold; }

/** Subheadings ***************************************************************/

	h1 + h2,
	#subtitle {
		/* #subtitle is a subtitle in an H2 under the H1 */
		margin-top: 0;
	}
	h2 + h3,
	h3 + h4,
	h4 + h5,
	h5 + h6 {
		margin-top: 1.2em; /* = 1 x line-height */
	}

/** Section divider ***********************************************************/

	:not(.head) > hr {
		font-size: 1.5em;
		text-align: center;
		margin: 1em auto;
		height: auto;
		border: transparent solid 0;
		background: transparent;
	}
	:not(.head) > hr::before {
		content: "\2727\2003\2003\2727\2003\2003\2727";
	}

/******************************************************************************/
/*                            Paragraphs and Lists                            */
/******************************************************************************/

	p {
		margin: 1em 0;
	}

	dd > p:first-child,
	li > p:first-child {
		margin-top: 0;
	}

	ul, ol {
		margin-left: 0;
		padding-left: 2em;
	}

	li {
		margin: 0.25em 0 0.5em;
		padding: 0;
	}

	dl dd {
		margin: 0 0 .5em 2em;
	}

	.head dd + dd { /* compact for header */
		margin-top: -.5em;
	}

	/* Style for algorithms */
	ol.algorithm ol:not(.algorithm),
	.algorithm > ol ol:not(.algorithm) {
	 border-left: 0.5em solid #DEF;
	}

	/* Put nice boxes around each algorithm. */
	[data-algorithm]:not(.heading) {
	  padding: .5em;
	  border: thin solid #ddd; border-radius: .5em;
	  margin: .5em calc(-0.5em - 1px);
	}
	[data-algorithm]:not(.heading) > :first-child {
	  margin-top: 0;
	}
	[data-algorithm]:not(.heading) > :last-child {
	  margin-bottom: 0;
	}

	/* Style for switch/case <dl>s */
	dl.switch > dd > ol.only,
	dl.switch > dd > .only > ol {
	 margin-left: 0;
	}
	dl.switch > dd > ol.algorithm,
	dl.switch > dd > .algorithm > ol {
	 margin-left: -2em;
	}
	dl.switch {
	 padding-left: 2em;
	}
	dl.switch > dt {
	 text-indent: -1.5em;
	 margin-top: 1em;
	}
	dl.switch > dt + dt {
	 margin-top: 0;
	}
	dl.switch > dt::before {
	 content: '\21AA';
	 padding: 0 0.5em 0 0;
	 display: inline-block;
	 width: 1em;
	 text-align: right;
	 line-height: 0.5em;
	}

/** Terminology Markup ********************************************************/


/******************************************************************************/
/*                                 Inline Markup                              */
/******************************************************************************/

/** Terminology Markup ********************************************************/
	dfn   { /* Defining instance */
		font-weight: bolder;
	}
	a > i { /* Instance of term */
		font-style: normal;
	}
	dt dfn code, code.idl {
		font-size: medium;
	}
	dfn var {
		font-style: normal;
	}

/** Change Marking ************************************************************/

	del { color: red;  text-decoration: line-through; }
	ins { color: #080; text-decoration: underline;    }

/** Miscellaneous improvements to inline formatting ***************************/

	sup {
		vertical-align: super;
		font-size: 80%
	}

/******************************************************************************/
/*                                    Code                                    */
/******************************************************************************/

/** General monospace/pre rules ***********************************************/

	pre, code, samp {
		font-family: Menlo, Consolas, "DejaVu Sans Mono", Monaco, monospace;
		font-size: .9em;
		page-break-inside: avoid;
		hyphens: none;
		text-transform: none;
	}
	pre code,
	code code {
		font-size: 100%;
	}

	pre {
		margin-top: 1em;
		margin-bottom: 1em;
		overflow: auto;
	}

/** Inline Code fragments *****************************************************/

  /* Do something nice. */

/******************************************************************************/
/*                                    Links                                   */
/******************************************************************************/

/** General Hyperlinks ********************************************************/

	/* We hyperlink a lot, so make it less intrusive */
	a[href] {
		color: #034575;
		text-decoration: none;
		border-bottom: 1px solid #707070;
		/* Need a bit of extending for it to look okay */
		padding: 0 1px 0;
		margin: 0 -1px 0;
	}
	a:visited {
		border-bottom-color: #BBB;
	}

	/* Use distinguishing colors when user is interacting with the link */
	a[href]:focus,
	a[href]:hover {
		background: #f8f8f8;
		background: rgba(75%, 75%, 75%, .25);
		border-bottom-width: 3px;
		margin-bottom: -2px;
	}
	a[href]:active {
		color: #C00;
		border-color: #C00;
	}

	/* Backout above styling for W3C logo */
	.head .logo,
	.head .logo a {
		border: none;
		text-decoration: none;
		background: transparent;
	}

/******************************************************************************/
/*                                    Images                                  */
/******************************************************************************/

	img {
		border-style: none;
	}

	/* For autogen numbers, add
	   .caption::before, figcaption::before { content: "Figure " counter(figure) ". "; }
	*/

	figure, .figure, .sidefigure {
		page-break-inside: avoid;
		text-align: center;
		margin: 2.5em 0;
	}
	.figure img,    .sidefigure img,    figure img,
	.figure object, .sidefigure object, figure object {
		max-width: 100%;
		margin: auto;
	}
	.figure pre, .sidefigure pre, figure pre {
		text-align: left;
		display: table;
		margin: 1em auto;
	}
	.figure table, figure table {
		margin: auto;
	}
	@media screen and (min-width: 20em) {
		.sidefigure {
			float: right;
			width: 50%;
			margin: 0 0 0.5em 0.5em
		}
	}
	.caption, figcaption, caption {
		font-style: italic;
		font-size: 90%;
	}
	.caption::before, figcaption::before, figcaption > .marker {
		font-weight: bold;
	}
	.caption, figcaption {
		counter-increment: figure;
	}

	/* DL list is indented 2em, but figure inside it is not */
	dd > .figure, dd > figure { margin-left: -2em }

/******************************************************************************/
/*                             Colored Boxes                                  */
/******************************************************************************/

	.issue, .note, .example, .assertion, .advisement, blockquote {
		padding: .5em;
		border: .5em;
		border-left-style: solid;
		page-break-inside: avoid;
	}
	span.issue, span.note {
		padding: .1em .5em .15em;
		border-right-style: solid;
	}

	.issue,
	.note,
	.example,
	.advisement,
	.assertion,
	blockquote {
		margin: 1em auto;
	}
	.note  > p:first-child,
	.issue > p:first-child,
	blockquote > :first-child {
		margin-top: 0;
	}
	blockquote > :last-child {
		margin-bottom: 0;
	}

/** Blockquotes ***************************************************************/

	blockquote {
		border-color: silver;
	}

/** Open issue ****************************************************************/

	.issue {
		border-color: #E05252;
		background: #FBE9E9;
		counter-increment: issue;
		overflow: auto;
	}
	.issue::before, .issue > .marker {
		text-transform: uppercase;
		color: #AE1E1E;
		padding-right: 1em;
		text-transform: uppercase;
	}
	/* Add .issue::before { content: "Issue " counter(issue) " "; } for autogen numbers,
	   or use class="marker" to mark up the issue number in source. */

/** Example *******************************************************************/

	.example {
		border-color: #E0CB52;
		background: #FCFAEE;
		counter-increment: example;
		overflow: auto;
		clear: both;
	}
	.example::before, .example > .marker {
		text-transform: uppercase;
		color: #827017;
		min-width: 7.5em;
		display: block;
	}
	/* Add .example::before { content: "Example " counter(example) " "; } for autogen numbers,
	   or use class="marker" to mark up the example number in source. */

/** Non-normative Note ********************************************************/

	.note {
		border-color: #52E052;
		background: #E9FBE9;
		overflow: auto;
	}

	.note::before, .note > .marker,
	details.note > summary::before,
	details.note > summary > .marker {
		text-transform: uppercase;
		display: block;
		color: hsl(120, 70%, 30%);
	}
	/* Add .note::before { content: "Note"; } for autogen label,
	   or use class="marker" to mark up the label in source. */

	details.note > summary {
		display: block;
		color: hsl(120, 70%, 30%);
	}
	details.note[open] > summary {
		border-bottom: 1px silver solid;
	}

/** Assertion Box *************************************************************/
	/*  for assertions in algorithms */

	.assertion {
		border-color: #AAA;
		background: #EEE;
	}

/** Advisement Box ************************************************************/
	/*  for attention-grabbing normative statements */

	.advisement {
		border-color: orange;
		border-style: none solid;
		background: #FFEECC;
	}
	strong.advisement {
		display: block;
		text-align: center;
	}
	.advisement > .marker {
		color: #B35F00;
	}

/** Spec Obsoletion Notice ****************************************************/
	/* obnoxious obsoletion notice for older/abandoned specs. */

	details {
		display: block;
	}
	summary {
		font-weight: bolder;
	}

	.annoying-warning:not(details),
	details.annoying-warning:not([open]) > summary,
	details.annoying-warning[open] {
		background: #fdd;
		color: red;
		font-weight: bold;
		padding: .75em 1em;
		border: thick red;
		border-style: solid;
		border-radius: 1em;
	}
	.annoying-warning :last-child {
		margin-bottom: 0;
	}

@media not print {
	details.annoying-warning[open] {
		position: fixed;
		left: 1em;
		right: 1em;
		bottom: 1em;
		z-index: 1000;
	}
}

	details.annoying-warning:not([open]) > summary {
		text-align: center;
	}

/** Entity Definition Boxes ***************************************************/

	.def {
		padding: .5em 1em;
		background: #DEF;
		margin: 1.2em 0;
		border-left: 0.5em solid #8CCBF2;
	}

/******************************************************************************/
/*                                    Tables                                  */
/******************************************************************************/

	th, td {
		text-align: left;
		text-align: start;
	}

/** Property/Descriptor Definition Tables *************************************/

	table.def {
		/* inherits .def box styling, see above */
		width: 100%;
		border-spacing: 0;
	}

	table.def td,
	table.def th {
		padding: 0.5em;
		vertical-align: baseline;
		border-bottom: 1px solid #bbd7e9;
	}

	table.def > tbody > tr:last-child th,
	table.def > tbody > tr:last-child td {
		border-bottom: 0;
	}

	table.def th {
		font-style: italic;
		font-weight: normal;
		padding-left: 1em;
		width: 3em;
	}

	/* For when values are extra-complex and need formatting for readability */
	table td.pre {
		white-space: pre-wrap;
	}

	/* A footnote at the bottom of a def table */
	table.def           td.footnote {
		padding-top: 0.6em;
	}
	table.def           td.footnote::before {
		content: " ";
		display: block;
		height: 0.6em;
		width: 4em;
		border-top: thin solid;
	}

/** Data tables (and properly marked-up index tables) *************************/
	/*
		 <table class="data"> highlights structural relationships in a table
		 when correct markup is used (e.g. thead/tbody, th vs. td, scope attribute)

		 Use class="complex data" for particularly complicated tables --
		 (This will draw more lines: busier, but clearer.)

		 Use class="long" on table cells with paragraph-like contents
		 (This will adjust text alignment accordingly.)
		 Alternately use class="longlastcol" on tables, to have the last column assume "long".
	*/

	table {
		word-wrap: normal;
		overflow-wrap: normal;
		hyphens: manual;
	}

	table.data,
	table.index {
		margin: 1em auto;
		border-collapse: collapse;
		border: hidden;
		width: 100%;
	}
	table.data caption,
	table.index caption {
		max-width: 50em;
		margin: 0 auto 1em;
	}

	table.data td,  table.data th,
	table.index td, table.index th {
		padding: 0.5em 1em;
		border-width: 1px;
		border-color: silver;
		border-top-style: solid;
	}

	table.data thead td:empty {
		padding: 0;
		border: 0;
	}

	table.data  thead,
	table.index thead,
	table.data  tbody,
	table.index tbody {
		border-bottom: 2px solid;
	}

	table.data colgroup,
	table.index colgroup {
		border-left: 2px solid;
	}

	table.data  tbody th:first-child,
	table.index tbody th:first-child  {
		border-right: 2px solid;
		border-top: 1px solid silver;
		padding-right: 1em;
	}

	table.data th[colspan],
	table.data td[colspan] {
		text-align: center;
	}

	table.complex.data th,
	table.complex.data td {
		border: 1px solid silver;
		text-align: center;
	}

	table.data.longlastcol td:last-child,
	table.data td.long {
	 vertical-align: baseline;
	 text-align: left;
	}

	table.data img {
		vertical-align: middle;
	}


/*
Alternate table alignment rules

	table.data,
	table.index {
		text-align: center;
	}

	table.data  thead th[scope="row"],
	table.index thead th[scope="row"] {
		text-align: right;
	}

	table.data  tbody th:first-child,
	table.index tbody th:first-child  {
		text-align: right;
	}

Possible extra rowspan handling

	table.data  tbody th[rowspan]:not([rowspan='1']),
	table.index tbody th[rowspan]:not([rowspan='1']),
	table.data  tbody td[rowspan]:not([rowspan='1']),
	table.index tbody td[rowspan]:not([rowspan='1']) {
		border-left: 1px solid silver;
	}

	table.data  tbody th[rowspan]:first-child,
	table.index tbody th[rowspan]:first-child,
	table.data  tbody td[rowspan]:first-child,
	table.index tbody td[rowspan]:first-child{
		border-left: 0;
		border-right: 1px solid silver;
	}
*/

/******************************************************************************/
/*                                  Indices                                   */
/******************************************************************************/


/** Table of Contents *********************************************************/

	.toc a {
		/* More spacing; use padding to make it part of the click target. */
		padding-top: 0.1rem;
		/* Larger, more consistently-sized click target */
		display: block;
		/* Reverse color scheme */
		color: black;
		border-color: #3980B5;
		border-bottom-width: 3px !important;
		margin-bottom: 0px !important;
	}
	.toc a:visited {
		border-color: #054572;
	}
	.toc a:not(:focus):not(:hover) {
		/* Allow colors to cascade through from link styling */
		border-bottom-color: transparent;
	}

	.toc, .toc ol, .toc ul, .toc li {
		list-style: none; /* Numbers must be inlined into source */
		/* because generated content isn't search/selectable and markers can't do multilevel yet */
		margin:  0;
		padding: 0;
		line-height: 1.1rem; /* consistent spacing */
	}

	/* ToC not indented until third level, but font style & margins show hierarchy */
	.toc > li             { font-weight: bold;   }
	.toc > li li          { font-weight: normal; }
	.toc > li li li       { font-size:   95%;    }
	.toc > li li li li    { font-size:   90%;    }
	.toc > li li li li .secno { font-size: 85%; }
	.toc > li li li li li { font-size:   85%;    }
	.toc > li li li li li .secno { font-size: 100%; }

	/* @supports not (display:grid) { */
		.toc > li             { margin: 1.5rem 0;    }
		.toc > li li          { margin: 0.3rem 0;    }
		.toc > li li li       { margin-left: 2rem;   }

		/* Section numbers in a column of their own */
		.toc .secno {
			float: left;
			width: 4rem;
			white-space: nowrap;
		}

		.toc li {
			clear: both;
		}

		:not(li) > .toc              { margin-left:  5rem; }
		.toc .secno                  { margin-left: -5rem; }
		.toc > li li li .secno       { margin-left: -7rem; }
		.toc > li li li li .secno    { margin-left: -9rem; }
		.toc > li li li li li .secno { margin-left: -11rem; }

		/* Tighten up indentation in narrow ToCs */
		@media (max-width: 30em) {
			:not(li) > .toc              { margin-left:  4rem; }
			.toc .secno                  { margin-left: -4rem; }
			.toc > li li li              { margin-left:  1rem; }
			.toc > li li li .secno       { margin-left: -5rem; }
			.toc > li li li li .secno    { margin-left: -6rem; }
			.toc > li li li li li .secno { margin-left: -7rem; }
		}
	/* } */

	@supports (display:grid) and (display:contents) {
		/* Use #toc over .toc to override non-@supports rules. */
		#toc {
			display: grid;
			align-content: start;
			grid-template-columns: auto 1fr;
			grid-column-gap: 1rem;
			column-gap: 1rem;
			grid-row-gap: .6rem;
			row-gap: .6rem;
		}
		#toc h2 {
			grid-column: 1 / -1;
			margin-bottom: 0;
		}
		#toc ol,
		#toc li,
		#toc a {
			display: contents;
			/* Switch <a> to subgrid when supported */
		}
		#toc span {
			margin: 0;
		}
		#toc > .toc > li > a > span {
			/* The spans of the top-level list,
			   comprising the first items of each top-level section. */
			margin-top: 1.1rem;
		}
		#toc#toc .secno { /* Ugh, need more specificity to override base.css */
			grid-column: 1;
			width: auto;
			margin-left: 0;
		}
		#toc .content {
			grid-column: 2;
			width: auto;
			margin-right: 1rem;
		}
		#toc .content:hover {
			background: rgba(75%, 75%, 75%, .25);
			border-bottom: 3px solid #054572;
			margin-bottom: -3px;
		}
		#toc li li li .content {
			margin-left: 1rem;
		}
		#toc li li li li .content {
			margin-left: 2rem;
		}
	}


/** Index *********************************************************************/

	/* Index Lists: Layout */
	ul.index       { margin-left: 0; columns: 15em; text-indent: 1em hanging; }
	ul.index li    { margin-left: 0; list-style: none; break-inside: avoid; }
	ul.index li li { margin-left: 1em }
	ul.index dl    { margin-top: 0; }
	ul.index dt    { margin: .2em 0 .2em 20px;}
	ul.index dd    { margin: .2em 0 .2em 40px;}
	/* Index Lists: Typography */
	ul.index ul,
	ul.index dl { font-size: smaller; }
	@media not print {
		ul.index li span {
			white-space: nowrap;
			color: transparent; }
		ul.index li a:hover + span,
		ul.index li a:focus + span {
			color: #707070;
		}
	}

/** Index Tables *****************************************************/
	/* See also the data table styling section, which this effectively subclasses */

	table.index {
		font-size: small;
		border-collapse: collapse;
		border-spacing: 0;
		text-align: left;
		margin: 1em 0;
	}

	table.index td,
	table.index th {
		padding: 0.4em;
	}

	table.index tr:hover td:not([rowspan]),
	table.index tr:hover th:not([rowspan]) {
		background: #f7f8f9;
	}

	/* The link in the first column in the property table (formerly a TD) */
	table.index th:first-child a {
		font-weight: bold;
	}

/******************************************************************************/
/*                                    Print                                   */
/******************************************************************************/

	@media print {
		/* Pages have their own margins. */
		html {
			margin: 0;
		}
		/* Serif for print. */
		body {
			font-family: serif;
		}
	}
	@page {
		margin: 1.5cm 1.1cm;
	}

/******************************************************************************/
/*                                    Legacy                                  */
/******************************************************************************/

	/* This rule is inherited from past style sheets. No idea what it's for. */
	.hide { display: none }



/******************************************************************************/
/*                             Overflow Control                               */
/******************************************************************************/

	.figure .caption, .sidefigure .caption, figcaption {
		/* in case figure is overlarge, limit caption to 50em */
		max-width: 50rem;
		margin-left: auto;
		margin-right: auto;
	}
	.overlarge {
		/* Magic to create good table positioning:
		   "content column" is 50ems wide at max; less on smaller screens.
		   Extra space (after ToC + content) is empty on the right.

		   1. When table < content column, centers table in column.
		   2. When content < table < available, left-aligns.
		   3. When table > available, fills available + scroll bar.
		*/ 
		display: grid;
		grid-template-columns: minmax(0, 50em);
	}
	.overlarge > table {
		/* limit preferred width of table */
		max-width: 50em;
		margin-left: auto;
		margin-right: auto;
	}

	@media (min-width: 55em) {
		.overlarge {
			margin-right: calc(13px + 26.5rem - 50vw);
			max-width: none;
		}
	}
	@media screen and (min-width: 78em) {
		body:not(.toc-inline) .overlarge {
			/* 30.5em body padding 50em content area */
			margin-right: calc(40em - 50vw) !important;
		}
	}
	@media screen and (min-width: 90em) {
		body:not(.toc-inline) .overlarge {
			/* 4em html margin 30.5em body padding 50em content area */
			margin-right: calc(84.5em - 100vw) !important;
		}
	}

	@media not print {
		.overlarge {
			overflow-x: auto;
			/* See Lea Verou's explanation background-attachment:
			 * http://lea.verou.me/2012/04/background-attachment-local/
			 *
			background: top left  / 4em 100% linear-gradient(to right,  #ffffff, rgba(255, 255, 255, 0)) local,
			            top right / 4em 100% linear-gradient(to left, #ffffff, rgba(255, 255, 255, 0)) local,
			            top left  / 1em 100% linear-gradient(to right,  #c3c3c5, rgba(195, 195, 197, 0)) scroll,
			            top right / 1em 100% linear-gradient(to left, #c3c3c5, rgba(195, 195, 197, 0)) scroll,
			            white;
			background-repeat: no-repeat;
			*/
		}
	}
</style>
  <link href="https://www.w3.org/StyleSheets/TR/2016/cg-draft" rel="stylesheet">
  <link href="https://wicg.github.io/webusb" rel="canonical">
<style>
table {
  border-collapse: collapse;
  border-left-style: hidden;
  border-right-style: hidden;
  text-align: left;
}
table caption {
  font-weight: bold;
  padding: 3px;
  text-align: left;
}
table td, table th {
  border: 1px solid black;
  padding: 3px;
}
</style>
<style>/* style-md-lists */

/* This is a weird hack for me not yet following the commonmark spec
   regarding paragraph and lists. */
[data-md] > :first-child {
    margin-top: 0;
}
[data-md] > :last-child {
    margin-bottom: 0;
}</style>
<style>/* style-selflinks */

.heading, .issue, .note, .example, li, dt {
    position: relative;
}
a.self-link {
    position: absolute;
    top: 0;
    left: calc(-1 * (3.5rem - 26px));
    width: calc(3.5rem - 26px);
    height: 2em;
    text-align: center;
    border: none;
    transition: opacity .2s;
    opacity: .5;
}
a.self-link:hover {
    opacity: 1;
}
.heading > a.self-link {
    font-size: 83%;
}
li > a.self-link {
    left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
    top: auto;
    left: auto;
    opacity: 0;
    width: 1.5em;
    height: 1.5em;
    background: gray;
    color: white;
    font-style: normal;
    transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
    opacity: 1;
}
dfn > a.self-link:hover {
    color: black;
}

a.self-link::before            { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before      { content: "#"; }</style>
<style>/* style-counters */

body {
    counter-reset: example figure issue;
}
.issue {
    counter-increment: issue;
}
.issue:not(.no-marker)::before {
    content: "Issue " counter(issue);
}

.example {
    counter-increment: example;
}
.example:not(.no-marker)::before {
    content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
    content: "Invalid Example" counter(example);
}

figcaption {
    counter-increment: figure;
}
figcaption:not(.no-marker)::before {
    content: "Figure " counter(figure) " ";
}</style>
<style>/* style-autolinks */

.css.css, .property.property, .descriptor.descriptor {
    color: #005a9c;
    font-size: inherit;
    font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
    content: "‘";
}
.css::after, .property::after, .descriptor::after {
    content: "’";
}
.property, .descriptor {
    /* Don't wrap property and descriptor names */
    white-space: nowrap;
}
.type { /* CSS value <type> */
    font-style: italic;
}
pre .property::before, pre .property::after {
    content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
    content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
    content: "’";
}

[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
    content: "";
}

[data-link-type=element],
[data-link-type=element-attr] {
    font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
    font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after  { content: ">" }

[data-link-type=biblio] {
    white-space: pre;
}</style>
<style>/* style-dfn-panel */

.dfn-panel {
    position: absolute;
    z-index: 35;
    height: auto;
    width: -webkit-fit-content;
    width: fit-content;
    max-width: 300px;
    max-height: 500px;
    overflow: auto;
    padding: 0.5em 0.75em;
    font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
    background: #DDDDDD;
    color: black;
    border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: black; }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
    display: inline-block;
    position: fixed;
    left: .5em;
    bottom: 2em;
    margin: 0 auto;
    max-width: calc(100vw - 1.5em - .4em - .5em);
    max-height: 30vh;
}

.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-syntax-highlighting */
pre.idl.highlight { color: #708090; }
.highlight:not(.idl) { background: hsl(24, 20%, 95%); }
code.highlight { padding: .1em; border-radius: .3em; }
pre.highlight, pre > code.highlight { display: block; padding: 1em; margin: .5em 0; overflow: auto; border-radius: 0; }
c-[a] { color: #990055 } /* Keyword.Declaration */
c-[b] { color: #990055 } /* Keyword.Type */
c-[c] { color: #708090 } /* Comment */
c-[d] { color: #708090 } /* Comment.Multiline */
c-[e] { color: #0077aa } /* Name.Attribute */
c-[f] { color: #669900 } /* Name.Tag */
c-[g] { color: #222222 } /* Name.Variable */
c-[k] { color: #990055 } /* Keyword */
c-[l] { color: #000000 } /* Literal */
c-[m] { color: #000000 } /* Literal.Number */
c-[n] { color: #0077aa } /* Name */
c-[o] { color: #999999 } /* Operator */
c-[p] { color: #999999 } /* Punctuation */
c-[s] { color: #a67f59 } /* Literal.String */
c-[t] { color: #a67f59 } /* Literal.String.Single */
c-[u] { color: #a67f59 } /* Literal.String.Double */
c-[cp] { color: #708090 } /* Comment.Preproc */
c-[c1] { color: #708090 } /* Comment.Single */
c-[cs] { color: #708090 } /* Comment.Special */
c-[kc] { color: #990055 } /* Keyword.Constant */
c-[kn] { color: #990055 } /* Keyword.Namespace */
c-[kp] { color: #990055 } /* Keyword.Pseudo */
c-[kr] { color: #990055 } /* Keyword.Reserved */
c-[ld] { color: #000000 } /* Literal.Date */
c-[nc] { color: #0077aa } /* Name.Class */
c-[no] { color: #0077aa } /* Name.Constant */
c-[nd] { color: #0077aa } /* Name.Decorator */
c-[ni] { color: #0077aa } /* Name.Entity */
c-[ne] { color: #0077aa } /* Name.Exception */
c-[nf] { color: #0077aa } /* Name.Function */
c-[nl] { color: #0077aa } /* Name.Label */
c-[nn] { color: #0077aa } /* Name.Namespace */
c-[py] { color: #0077aa } /* Name.Property */
c-[ow] { color: #999999 } /* Operator.Word */
c-[mb] { color: #000000 } /* Literal.Number.Bin */
c-[mf] { color: #000000 } /* Literal.Number.Float */
c-[mh] { color: #000000 } /* Literal.Number.Hex */
c-[mi] { color: #000000 } /* Literal.Number.Integer */
c-[mo] { color: #000000 } /* Literal.Number.Oct */
c-[sb] { color: #a67f59 } /* Literal.String.Backtick */
c-[sc] { color: #a67f59 } /* Literal.String.Char */
c-[sd] { color: #a67f59 } /* Literal.String.Doc */
c-[se] { color: #a67f59 } /* Literal.String.Escape */
c-[sh] { color: #a67f59 } /* Literal.String.Heredoc */
c-[si] { color: #a67f59 } /* Literal.String.Interpol */
c-[sx] { color: #a67f59 } /* Literal.String.Other */
c-[sr] { color: #a67f59 } /* Literal.String.Regex */
c-[ss] { color: #a67f59 } /* Literal.String.Symbol */
c-[vc] { color: #0077aa } /* Name.Variable.Class */
c-[vg] { color: #0077aa } /* Name.Variable.Global */
c-[vi] { color: #0077aa } /* Name.Variable.Instance */
c-[il] { color: #000000 } /* Literal.Number.Integer.Long */
</style>
 <body class="h-entry">
  <div class="head">
   <p data-fill-with="logo"></p>
   <h1 class="p-name no-ref" id="title">WebUSB API</h1>
   <h2 class="no-num no-toc no-ref heading settled" id="subtitle"><span class="content">Draft Community Group Report, <time class="dt-updated" datetime="1970-01-01">1 January 1970</time></span></h2>
   <div data-fill-with="spec-metadata">
    <dl>
     <dt>This version:
     <dd><a class="u-url" href="https://wicg.github.io/webusb">https://wicg.github.io/webusb</a>
     <dt class="editor">Editors:
     <dd class="editor p-author h-card vcard" data-editor-id="83788"><a class="p-name fn u-email email" href="mailto:reillyg@google.com">Reilly Grant</a> (<a class="p-org org" href="https://www.google.com">Google LLC</a>)
     <dd class="editor p-author h-card vcard" data-editor-id="87080"><a class="p-name fn u-email email" href="mailto:rockot@google.com">Ken Rockot</a> (<a class="p-org org" href="https://www.google.com">Google LLC</a>)
     <dd class="editor p-author h-card vcard" data-editor-id="106543"><a class="p-name fn u-email email" href="mailto:odejesush@google.com">Ovidio Henriquez</a> (<a class="p-org org" href="https://www.google.com">Google LLC</a>)
     <dt>Participate:
     <dd><a href="https://www.w3.org/community/wicg/">Join the W3C Community Group</a>
     <dd><a href="irc://irc.w3.org:6665/#webusb">IRC: #webusb on W3C’s IRC</a> (Stay around for an answer, it make take a while)
     <dd><a href="http://stackoverflow.com/questions/tagged/webusb">Ask questions on StackOverflow</a>
    </dl>
   </div>
   <div data-fill-with="warning"></div>
   <p class="copyright" data-fill-with="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 1970 the Contributors to the WebUSB API Specification, published by the <a href="https://www.w3.org/community/wicg/">Web Platform Incubator Community Group</a> under the <a href="https://www.w3.org/community/about/agreements/cla/">W3C Community Contributor License Agreement (CLA)</a>.
A human-readable <a href="http://www.w3.org/community/about/agreements/cla-deed/">summary</a> is available. </p>
   <hr title="Separator for header">
  </div>
  <div class="p-summary" data-fill-with="abstract">
   <h2 class="no-num no-toc no-ref heading settled" id="abstract"><span class="content">Abstract</span></h2>
   <p>This document describes an API for securely providing access to Universal Serial Bus devices from web pages.</p>
  </div>
  <div data-fill-with="at-risk"></div>
  <h2 class="no-num no-toc no-ref heading settled" id="status"><span class="content">Status of this document</span></h2>
  <div data-fill-with="status">
   <p> This specification was published by the <a href="https://www.w3.org/community/wicg/">Web Platform Incubator Community Group</a>.
  It is not a W3C Standard nor is it on the W3C Standards Track.

  Please note that under the <a href="https://www.w3.org/community/about/agreements/cla/">W3C Community Contributor License Agreement (CLA)</a> there is a limited opt-out and other conditions apply.

  Learn more about <a href="http://www.w3.org/community/">W3C Community and Business Groups</a>. </p>
   <p></p>
  </div>
  <div data-fill-with="at-risk"></div>
  <nav data-fill-with="table-of-contents" id="toc">
   <h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
   <ol class="toc" role="directory">
    <li><a href="#introduction"><span class="secno">1</span> <span class="content">Introduction</span></a>
    <li>
     <a href="#motivating-applications"><span class="secno">2</span> <span class="content">Motivating Applications</span></a>
     <ol class="toc">
      <li><a href="#app-edu-devices"><span class="secno">2.1</span> <span class="content">Educational Devices</span></a>
      <li><a href="#app-drivers"><span class="secno">2.2</span> <span class="content">Web Drivers</span></a>
      <li><a href="#app-updates-and-diagnostics"><span class="secno">2.3</span> <span class="content">Devices Updates and Diagnostics</span></a>
     </ol>
    <li>
     <a href="#security-and-privacy"><span class="secno">3</span> <span class="content">Security and Privacy Considerations</span></a>
     <ol class="toc">
      <li><a href="#abusing-a-device"><span class="secno">3.1</span> <span class="content">Abusing Access to a Device</span></a>
      <li><a href="#attacking-a-device"><span class="secno">3.2</span> <span class="content">Attacking a Device</span></a>
      <li><a href="#attacking-the-host"><span class="secno">3.3</span> <span class="content">Attacking the Host</span></a>
     </ol>
    <li>
     <a href="#webusb-descriptors-and-requests"><span class="secno">4</span> <span class="content">WebUSB Descriptors and Requests</span></a>
     <ol class="toc">
      <li><a href="#webusb-platform-capability-descriptor"><span class="secno">4.1</span> <span class="content">WebUSB Platform Capability Descriptor</span></a>
      <li>
       <a href="#device-requests"><span class="secno">4.2</span> <span class="content">WebUSB Device Requests</span></a>
       <ol class="toc">
        <li><a href="#get-url"><span class="secno">4.2.1</span> <span class="content">Get URL</span></a>
       </ol>
      <li>
       <a href="#webusb-descriptors"><span class="secno">4.3</span> <span class="content">WebUSB Descriptors</span></a>
       <ol class="toc">
        <li><a href="#url-descriptor"><span class="secno">4.3.1</span> <span class="content">URL Descriptor</span></a>
       </ol>
     </ol>
    <li>
     <a href="#enumeration"><span class="secno">5</span> <span class="content">Device Enumeration</span></a>
     <ol class="toc">
      <li><a href="#events"><span class="secno">5.1</span> <span class="content">Events</span></a>
     </ol>
    <li>
     <a href="#device-usage"><span class="secno">6</span> <span class="content">Device Usage</span></a>
     <ol class="toc">
      <li><a href="#transfers"><span class="secno">6.1</span> <span class="content">Transfers</span></a>
      <li><a href="#configurations"><span class="secno">6.2</span> <span class="content">Configurations</span></a>
      <li><a href="#interfaces"><span class="secno">6.3</span> <span class="content">Interfaces</span></a>
      <li><a href="#endpoints"><span class="secno">6.4</span> <span class="content">Endpoints</span></a>
     </ol>
    <li>
     <a href="#integrations"><span class="secno">7</span> <span class="content">Integrations</span></a>
     <ol class="toc">
      <li><a href="#feature-policy"><span class="secno">7.1</span> <span class="content">Feature Policy</span></a>
      <li><a href="#permission-api"><span class="secno">7.2</span> <span class="content">Permission API</span></a>
     </ol>
    <li><a href="#terminology"><span class="secno">8</span> <span class="content">Terminology</span></a>
    <li>
     <a href="#appendix-intro"><span class="secno">9</span> <span class="content">Appendix: A Brief Introduction to USB</span></a>
     <ol class="toc">
      <li><a href="#appendix-descriptors"><span class="secno">9.1</span> <span class="content">Descriptors</span></a>
      <li><a href="#appendix-transfers"><span class="secno">9.2</span> <span class="content">Transfers</span></a>
     </ol>
    <li><a href="#conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
    <li>
     <a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
     <ol class="toc">
      <li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
      <li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
     </ol>
    <li>
     <a href="#references"><span class="secno"></span> <span class="content">References</span></a>
     <ol class="toc">
      <li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
      <li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
     </ol>
    <li><a href="#idl-index"><span class="secno"></span> <span class="content">IDL Index</span></a>
    <li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
   </ol>
  </nav>
  <main>
   <h2 class="heading settled" data-level="1" id="introduction"><span class="secno">1. </span><span class="content">Introduction</span><a class="self-link" href="#introduction"></a></h2>
   <p><em>This section is non-normative</em>.</p>
   <p>The Universal Serial Bus (USB) is the de-facto standard for wired peripherals.
Most USB devices implement one of roughly a dozen standard "device classes"
which specify a way for the device to advertise the features it supports and
commands and data formats for using those features. Standard device classes
include keyboard, mice, audio, video and storage devices. Operating systems
support such devices using the "class driver" provided by the OS vendor. There
is however a long tail of devices that do not fit into one of the standardized
device classes.  These devices require hardware vendors to write native drivers
and SDKs in order for developers to take advantage of them and this native code
prevents these devices from being used by the web.</p>
   <p>The WebUSB API provides a way to safely expose USB device services to the web.
It provides an API familiar to developers who have used existing native USB
libraries and exposes the device interfaces defined by existing specifications.
With this API hardware manufacturers will have the ability to build
cross-platform JavaScript SDKs for their devices. This will be good for the web
because, instead of waiting for a new kind of device to be popular enough for
browsers to provide a specific API, new and innovative hardware can be built
for the web from day one.</p>
   <p>For more information about USB see <a href="#appendix-intro">§ 9 Appendix: A Brief Introduction to USB</a>.</p>
   <h2 class="heading settled" data-level="2" id="motivating-applications"><span class="secno">2. </span><span class="content">Motivating Applications</span><a class="self-link" href="#motivating-applications"></a></h2>
   <p><em>This section is non-normative</em>.</p>
   <h3 class="heading settled" data-level="2.1" id="app-edu-devices"><span class="secno">2.1. </span><span class="content">Educational Devices</span><a class="self-link" href="#app-edu-devices"></a></h3>
   <p>The software delivery model of the web is a key enabler for educational
applications because they can be quickly loaded on any computer without
questions of platform compatibility or administrative credentials. Science
classes are incorporating computerized measurement and data logging into their
lessons. These tools require bundled software that may be difficult to install
on managed computers as every new native application adds overhead to an already
stressed IT department. Web-based hardware APIs allow support for these devices
to be built directly into existing online course materials, providing a
completely seamless experience.</p>
   <p>Students learning to code with one of the many microcontroller development kits
can take advantage of online developer tools to write and upload their code.
These tools already exist however they require a native component to interface
between the browser and the hardware. These native extensions add a barrier to
entry and may expose the user to security vulnerabilities in a way that that
code running in the sandboxed web environment does not.</p>
   <h3 class="heading settled" data-level="2.2" id="app-drivers"><span class="secno">2.2. </span><span class="content">Web Drivers</span><a class="self-link" href="#app-drivers"></a></h3>
   <p>The composablity of the web allows a new ecosystem of hardware support to be
built entirely from web technology. Taking 3D printers an example, imagine that
a site hosting 3D object designs wants to integrate printing directly into their
page. The web supports 2D printing but there is no API for the 3D variety. If
manufacturers host embeddable pages that use the WebUSB API to send data to
their printers, sites can use these pages to integrate support for the hardware
in the same way that features such as embedded maps are added to many existing
sites.</p>
   <h3 class="heading settled" data-level="2.3" id="app-updates-and-diagnostics"><span class="secno">2.3. </span><span class="content">Devices Updates and Diagnostics</span><a class="self-link" href="#app-updates-and-diagnostics"></a></h3>
   <p>While wireless protocols such as Bluetooth are often the more convenient choice
for consumer devices USB ports continue to proliferate because they are an easy
solution for power delivery and can serve as the connection of last resort when
the device isn’t working. By integrating update and diagnostic tools into their
support site a hardware manufacturer can provide tools for customers on any
platform and collect better diagnostic data when a customer reaches out for
support through their website. The <a data-link-type="dfn" href="#landing-page" id="ref-for-landing-page">landing page</a> provides a way for the
device manufacturer to direct the user to the right part of their website for
help with their device.</p>
   <h2 class="heading settled" data-level="3" id="security-and-privacy"><span class="secno">3. </span><span class="content">Security and Privacy Considerations</span><a class="self-link" href="#security-and-privacy"></a></h2>
   <p><em>This section is non-normative</em>.</p>
   <p>The WebUSB API is a powerful feature and has the possibility to expose users to
a number of new privacy and security risks. These risks can be broadly divided
into three categories that will be described in the sections below.</p>
   <h3 class="heading settled" data-level="3.1" id="abusing-a-device"><span class="secno">3.1. </span><span class="content">Abusing Access to a Device</span><a class="self-link" href="#abusing-a-device"></a></h3>
   <p>Peripheral devices can serve a number of purposes. They may store data, as a
flash drive does. They may collect information about the outside world as a
camera or microphone does. They may manipulate objects in the outside world as
a printer does. Each of the examples above have high-level APIs in the web
platform with security features that aim to prevent their abuse by a malicious
website. Storing data to or from an external drive requires the user to select
the file manually. Turning on the microphone or camera requires permission from
the user and may activate an indicator to let the user know data collection is
in progress. Printing a document requires explicit action as well. This API
provides a generic mechanism to connect to devices not covered by these
existing high-level APIs and so it requires a similarly generic mechanism for
preventing a malicious page from abusing a device.</p>
   <p>The first of these protections is the <code class="idl"><a data-link-type="idl" href="#dom-usb-requestdevice" id="ref-for-dom-usb-requestdevice">requestDevice()</a></code> function. The UA
may display a permission prompt when this function is called. Even for a
non-malicious page this action also preserves user privacy by preventing a site
from connecting to a device before the user is aware that such a connection is
possible. The UA may also display an indicator when a device connection is
active.</p>
   <p>Secondly, this specification requires that only secure contexts as described
in <a data-link-type="biblio" href="#biblio-powerful-features">[powerful-features]</a> can access USB devices. This ensures both the
authenticity of the code executing on behalf of the origin and that data read
from the device may not be intercepted in transit.</p>
   <p>Lastly, since USB devices are unable to distinguish requests from multiple
sources, operating systems only allow a USB interface to have a single owning
user-space or kernel-space driver. The UA acts as a user-space driver, therefore
allowing only a single execution context to claim a USB interface at a time. The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-claiminterface" id="ref-for-dom-usbdevice-claiminterface">claimInterface()</a></code> function will fail if multiple execution contexts
attempt to claim an interface.</p>
   <h3 class="heading settled" data-level="3.2" id="attacking-a-device"><span class="secno">3.2. </span><span class="content">Attacking a Device</span><a class="self-link" href="#attacking-a-device"></a></h3>
   <p>Historically, unless they were created for high security applications, USB
devices have been designed to trust the host they are connected to and so the
host is the traditional guardian of access to the capabilities a device
provides. In the development of this specification two possibilities were
considered. First, the UA could notify the device of the origin from which a
request originated. This would be similar to the <code>Referrer</code> header
included in HTTP request. The difficulty of this approach is that it places
the burden of access control on the device. Devices often have very limited
processing and storage capabilities and so an effort was made to limit the
amount of work necessary on the part of the device.</p>
   <p>The approach initially chosen during drafting of this specification was to
instead require that the UA control access though a mechanism similiar to <a data-link-type="biblio" href="#biblio-cors">[CORS]</a>. The device could provide the UA with a set of static data structures
defining a set of origins that are allowed to connect to it. To support a
transition period for existing devices it was proposed that information about
allowed origins could also be provided out of band through some kind of public
registry.</p>
   <p>A downside of this approach was two-fold. First, it required vendors to build
new devices with WebUSB in mind or rely on a public registry system that proved
difficult to specify. Product development cycles are long and as only an
Editor’s Draft this specification does not have the clout necessary to influence
product planning. Second, it provided no mechanism for third-party developers to
use this API with a device. This limited innovation and the number of developers
who could take advantage of this new capability.</p>
   <p>After considering these options the authors have decided that the permission
prompt encouraged by the <code class="idl"><a data-link-type="idl" href="#dom-usb-requestdevice" id="ref-for-dom-usb-requestdevice①">requestDevice()</a></code> method and the integration with <a href="#feature-policy">§ 7.1 Feature Policy</a> provide adequate protection against unwanted access to a
device.</p>
   <h3 class="heading settled" data-level="3.3" id="attacking-the-host"><span class="secno">3.3. </span><span class="content">Attacking the Host</span><a class="self-link" href="#attacking-the-host"></a></h3>
   <p>If a device is compromised then in addition to abusing its own capabilities
the attacker may also use it to in turn attack the host to which it is connected
or if the exploit is persistent any host it is connected to later. The methods
above are the ways in which this specification attempts to mitigate this attack
vector for once the device is under the control of an attacker (for example, by
uploading a malicious firmware image) there is nothing that can be done by the
UA to prevent further damage.</p>
   <p>This specification recommends device manufacturers practice defense in depth by
designing their devices to only accept signed firmware updates and/or require
physical access to the device in order to apply some configuration changes.</p>
   <h2 class="heading settled" data-level="4" id="webusb-descriptors-and-requests"><span class="secno">4. </span><span class="content">WebUSB Descriptors and Requests</span><a class="self-link" href="#webusb-descriptors-and-requests"></a></h2>
   <p>This specification defines descriptors and commands the UA MAY use to gather
information about the device specific to implementing this API.</p>
   <h3 class="heading settled dfn-paneled" data-dfn-type="dfn" data-level="4.1" data-lt="WebUSB Platform Capability Descriptor" data-noexport id="webusb-platform-capability-descriptor"><span class="secno">4.1. </span><span class="content">WebUSB Platform Capability Descriptor</span></h3>
   <p>A device announces support for the WebUSB command set by including the
following <a data-link-type="dfn" href="#platform-descriptor" id="ref-for-platform-descriptor">Platform Descriptor</a> in its <a data-link-type="dfn" href="#binary-object-store" id="ref-for-binary-object-store">Binary Object
Store</a>:</p>
   <table>
    <tbody>
     <tr>
      <th>Offset
      <th>Field
      <th>Size
      <th>Value
      <th>Description
     <tr>
      <td>0
      <td>bLength
      <td>1
      <td>Number
      <td>Size of this descriptor. Must be set to 24.
     <tr>
      <td>1
      <td>bDescriptorType
      <td>1
      <td>Constant
      <td>DEVICE CAPABILITY descriptor type (<a data-link-type="biblio" href="#biblio-usb31">[USB31]</a> Table 9-6).
     <tr>
      <td>2
      <td>bDevCapabilityType
      <td>1
      <td>Constant
      <td>PLATFORM capability type (<a data-link-type="biblio" href="#biblio-usb31">[USB31]</a> Table 9-14).
     <tr>
      <td>3
      <td>bReserved
      <td>1
      <td>Number
      <td>This field is reserved and shall be set to zero.
     <tr>
      <td>4
      <td>PlatformCapabilityUUID
      <td>16
      <td>UUID
      <td>Must be set to {3408b638-09a9-47a0-8bfd-a0768815b665}.
     <tr>
      <td>20
      <td>bcdVersion
      <td>2
      <td>BCD
      <td>Protocol version supported. Must be set to 0x0100.
     <tr>
      <td>22
      <td>bVendorCode
      <td>1
      <td>Number
      <td>bRequest value used for issuing WebUSB requests.
     <tr>
      <td>23
      <td>iLandingPage
      <td>1
      <td>Number
      <td>URL descriptor index of the device’s <a data-link-type="dfn" href="#landing-page" id="ref-for-landing-page①">landing page</a>.
   </table>
   <p>The <code>iLandingPage</code> field, when non-zero, indicates a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="landing-page">landing page</dfn> which the device manufacturer would like the user to
visit in order to control their device. The UA MAY suggest the user navigate
to this URL when the device is connected.</p>
   <p class="note" role="note"><span>Note:</span> The USB is a little-endian bus and so according to <a data-link-type="biblio" href="#biblio-rfc4122">[RFC4122]</a> the UUID
above MUST be sent over the wire as the byte sequence <code>{0x38, 0xB6, 0x08,
0x34, 0xA9, 0x09, 0xA0, 0x47, 0x8B, 0xFD, 0xA0, 0x76, 0x88, 0x15, 0xB6,
0x65}</code>.</p>
   <h3 class="heading settled" data-level="4.2" id="device-requests"><span class="secno">4.2. </span><span class="content">WebUSB Device Requests</span><a class="self-link" href="#device-requests"></a></h3>
   <p>All <a data-link-type="dfn" href="#control-transfer" id="ref-for-control-transfer">control transfers</a> defined by this specification are considered to
be vendor-specific requests. The <code>bVendorCode</code> value found
in the <a data-link-type="dfn" href="#webusb-platform-capability-descriptor" id="ref-for-webusb-platform-capability-descriptor">WebUSB Platform Capability Descriptor</a> provides the UA
with the <code>bRequest</code> the device expects the host to use when
issuing <a data-link-type="dfn" href="#control-transfer" id="ref-for-control-transfer①">control transfers</a> these requests. The request type is then
specified in the <code>wIndex</code> field.</p>
   <table>
    <caption>WebUSB Request Codes</caption>
    <tbody>
     <tr>
      <th>Constant
      <th>Value
     <tr>
      <td>(Reserved)
      <td>1
     <tr>
      <td>GET_URL
      <td>2
   </table>
   <h4 class="heading settled dfn-paneled" data-dfn-type="dfn" data-level="4.2.1" data-lt="Get URL" data-noexport id="get-url"><span class="secno">4.2.1. </span><span class="content">Get URL</span></h4>
   <p>This request fetches the URL descriptor with the given index.</p>
   <p>The device MUST respond with the <a data-link-type="dfn" href="#url-descriptor" id="ref-for-url-descriptor">URL Descriptor</a> at the given
index or stall the transfer if the index is invalid.</p>
   <table>
    <tbody>
     <tr>
      <th>bmRequestType 
      <th>bRequest
      <th>wValue
      <th>wIndex
      <th>wLength
      <th>Data
     <tr>
      <td>11000000B
      <td><code>bVendorCode</code>
      <td>Descriptor Index
      <td>GET_URL
      <td>Descriptor Length
      <td>Descriptor
   </table>
   <h3 class="heading settled" data-level="4.3" id="webusb-descriptors"><span class="secno">4.3. </span><span class="content">WebUSB Descriptors</span><a class="self-link" href="#webusb-descriptors"></a></h3>
   <p>These descriptor types are returned by requests defined in this
specification.</p>
   <table>
    <caption>WebUSB Descriptor Types</caption>
    <tbody>
     <tr>
      <th>Constant
      <th>Value
     <tr>
      <td>(Reserved)
      <td>0-2
     <tr>
      <td>WEBUSB_URL
      <td>3
   </table>
   <h4 class="heading settled dfn-paneled" data-dfn-type="dfn" data-level="4.3.1" data-lt="URL Descriptor" data-noexport id="url-descriptor"><span class="secno">4.3.1. </span><span class="content">URL Descriptor</span></h4>
   <p>This descriptor contains a single URL and is returned by the <a data-link-type="dfn" href="#get-url" id="ref-for-get-url">Get URL</a> request.</p>
   <table>
    <tbody>
     <tr>
      <th>Offset
      <th>Field
      <th>Size
      <th>Value
      <th>Description
     <tr>
      <td>0
      <td>bLength
      <td>1
      <td>Number
      <td>Size of this descriptor.
     <tr>
      <td>1
      <td>bDescriptorType
      <td>1
      <td>Constant
      <td>WEBUSB_URL.
     <tr>
      <td>2
      <td>bScheme
      <td>1
      <td>Number
      <td>URL scheme prefix.
     <tr>
      <td>3
      <td>URL
      <td>Variable
      <td>String
      <td>UTF-8 encoded URL (excluding the scheme prefix).
   </table>
   <p>The <code>bScheme</code> field MUST be one of these values:</p>
   <table>
    <caption>URL Prefixes</caption>
    <tbody>
     <tr>
      <th>Value
      <th>Prefix
     <tr>
      <td>0
      <td>"http://"
     <tr>
      <td>1
      <td>"https://"
     <tr>
      <td>255
      <td>""
   </table>
   <p>The special value <code>255</code> indicates that the entire URL, including
scheme, is encoded in the <code>URL</code> field.</p>
   <h2 class="heading settled" data-level="5" id="enumeration"><span class="secno">5. </span><span class="content">Device Enumeration</span><a class="self-link" href="#enumeration"></a></h2>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-usbdevicefilter"><code><c- g>USBDeviceFilter</c-></code></dfn> {
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short"><c- b>unsigned</c-> <c- b>short</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDeviceFilter" data-dfn-type="dict-member" data-export data-type="unsigned short " id="dom-usbdevicefilter-vendorid"><code><c- g>vendorId</c-></code></dfn>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short①"><c- b>unsigned</c-> <c- b>short</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDeviceFilter" data-dfn-type="dict-member" data-export data-type="unsigned short " id="dom-usbdevicefilter-productid"><code><c- g>productId</c-></code></dfn>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDeviceFilter" data-dfn-type="dict-member" data-export data-type="octet " id="dom-usbdevicefilter-classcode"><code><c- g>classCode</c-></code></dfn>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDeviceFilter" data-dfn-type="dict-member" data-export data-type="octet " id="dom-usbdevicefilter-subclasscode"><code><c- g>subclassCode</c-></code></dfn>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDeviceFilter" data-dfn-type="dict-member" data-export data-type="octet " id="dom-usbdevicefilter-protocolcode"><code><c- g>protocolCode</c-></code></dfn>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString"><c- b>DOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDeviceFilter" data-dfn-type="dict-member" data-export data-type="DOMString " id="dom-usbdevicefilter-serialnumber"><code><c- g>serialNumber</c-></code></dfn>;
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-usbdevicerequestoptions"><code><c- g>USBDeviceRequestOptions</c-></code></dfn> {
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-usbdevicefilter" id="ref-for-dictdef-usbdevicefilter"><c- n>USBDeviceFilter</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDeviceRequestOptions" data-dfn-type="dict-member" data-export data-type="sequence<USBDeviceFilter> " id="dom-usbdevicerequestoptions-filters"><code><c- g>filters</c-></code></dfn>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->), <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext"><c- g>SecureContext</c-></a>]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usb"><code><c- g>USB</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget"><c- n>EventTarget</c-></a> {
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler"><c- n>EventHandler</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USB" data-dfn-type="attribute" data-export data-type="EventHandler" id="dom-usb-onconnect"><code><c- g>onconnect</c-></code></dfn>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler①"><c- n>EventHandler</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USB" data-dfn-type="attribute" data-export data-type="EventHandler" id="dom-usb-ondisconnect"><code><c- g>ondisconnect</c-></code></dfn>;
  <c- b>Promise</c->&lt;<c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#usbdevice" id="ref-for-usbdevice"><c- n>USBDevice</c-></a>>> <dfn class="dfn-paneled idl-code" data-dfn-for="USB" data-dfn-type="method" data-export data-lt="getDevices()" id="dom-usb-getdevices"><code><c- g>getDevices</c-></code></dfn>();
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbdevice" id="ref-for-usbdevice①"><c- n>USBDevice</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USB" data-dfn-type="method" data-export data-lt="requestDevice(options)" id="dom-usb-requestdevice"><code><c- g>requestDevice</c-></code></dfn>(<a class="n" data-link-type="idl-name" href="#dictdef-usbdevicerequestoptions" id="ref-for-dictdef-usbdevicerequestoptions"><c- n>USBDeviceRequestOptions</c-></a> <dfn class="idl-code" data-dfn-for="USB/requestDevice(options)" data-dfn-type="argument" data-export id="dom-usb-requestdevice-options-options"><code><c- g>options</c-></code><a class="self-link" href="#dom-usb-requestdevice-options-options"></a></dfn>);
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed②"><c- g>Exposed</c-></a>=<c- n>Window</c->, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①"><c- g>SecureContext</c-></a>]
<c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="https://html.spec.whatwg.org/multipage/system-state.html#navigator" id="ref-for-navigator"><c- g>Navigator</c-></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#usb" id="ref-for-usb"><c- n>USB</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="Navigator" data-dfn-type="attribute" data-export data-readonly data-type="USB" id="dom-navigator-usb"><code><c- g>usb</c-></code></dfn>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed③"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->), <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext②"><c- g>SecureContext</c-></a>]
<c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="https://html.spec.whatwg.org/multipage/workers.html#workernavigator" id="ref-for-workernavigator"><c- g>WorkerNavigator</c-></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#usb" id="ref-for-usb①"><c- n>USB</c-></a> <dfn class="idl-code" data-dfn-for="WorkerNavigator" data-dfn-type="attribute" data-export data-readonly data-type="USB" id="dom-workernavigator-usb"><code><c- g>usb</c-></code><a class="self-link" href="#dom-workernavigator-usb"></a></dfn>;
};
</pre>
   <div class="example" id="example-df545f15">
    <a class="self-link" href="#example-df545f15"></a> In this example, we retrieve some devices to include in a UI. When the page is
first loaded, it should check if it already has permission to access any
connected devices by calling <code class="idl"><a data-link-type="idl" href="#dom-usb-getdevices" id="ref-for-dom-usb-getdevices">getDevices()</a></code>, 
<pre class="highlight">document<c- p>.</c->addEventListener<c- p>(</c-><c- t>'DOMContentLoaded'</c-><c- p>,</c-> async <c- p>()</c-> <c- p>=></c-> <c- p>{</c->
  <c- a>let</c-> devices <c- o>=</c-> await navigator<c- p>.</c->usb<c- p>.</c->getDevices<c- p>();</c->
  devices<c- p>.</c->forEach<c- p>(</c->device <c- p>=></c-> <c- p>{</c->
    <c- c1>// Add |device| to the UI.</c->
  <c- p>});</c->
<c- p>});</c->
</pre>
    <p>After the page is loaded the user may <a data-link-type="dfn" href="#connect" id="ref-for-connect">connect</a> or <a data-link-type="dfn" href="#disconnect" id="ref-for-disconnect">disconnect</a> a
device from their system so script should also register for these events in
order to keep the interface up-to-date,</p>
<pre class="highlight">navigator<c- p>.</c->usb<c- p>.</c->addEventListener<c- p>(</c-><c- t>'connect'</c-><c- p>,</c-> event <c- p>=></c-> <c- p>{</c->
  <c- c1>// Add |event.device| to the UI.</c->
<c- p>});</c->

navigator<c- p>.</c->usb<c- p>.</c->addEventListener<c- p>(</c-><c- t>'disconnect'</c-><c- p>,</c-> event <c- p>=></c-> <c- p>{</c->
  <c- c1>// Remove |event.device| from the UI.</c->
<c- p>});</c->
</pre>
    <p>If this is the first time the user has visited the page then it won’t have
permission to access any devices so the page must first call <code class="idl"><a data-link-type="idl" href="#dom-usb-requestdevice" id="ref-for-dom-usb-requestdevice②">requestDevice()</a></code> in response to a user gesture. In this case the page
supports devices from vendor <code>0xABCD</code> that carry the vendor-specific
subclass <code>0x01</code>,</p>
<pre class="highlight"><c- a>let</c-> button <c- o>=</c-> document<c- p>.</c->getElementById<c- p>(</c-><c- t>'request-device'</c-><c- p>);</c->
button<c- p>.</c->addEventListener<c- p>(</c-><c- t>'click'</c-><c- p>,</c-> async <c- p>()</c-> <c- p>=></c-> <c- p>{</c->
  <c- a>let</c-> device<c- p>;</c->
  <c- k>try</c-> <c- p>{</c->
    device <c- o>=</c-> await navigator<c- p>.</c->usb<c- p>.</c->requestDevice<c- p>({</c-> filters<c- o>:</c-> <c- p>[{</c->
        vendorId<c- o>:</c-> <c- mh>0xABCD</c-><c- p>,</c->
        classCode<c- o>:</c-> <c- mh>0xFF</c-><c- p>,</c-> <c- c1>// vendor-specific</c->
        protocolCode<c- o>:</c-> <c- mh>0x01</c->
    <c- p>}]});</c->
  <c- p>}</c-> <c- k>catch</c-> <c- p>(</c->err<c- p>)</c-> <c- p>{</c->
    <c- c1>// No device was selected.</c->
  <c- p>}</c->

  <c- k>if</c-> <c- p>(</c->device <c- o>!==</c-> <c- kc>undefined</c-><c- p>)</c-> <c- p>{</c->
    <c- c1>// Add |device| to the UI.</c->
  <c- p>}</c->
<c- p>});</c->
</pre>
   </div>
   <p>A USB device <var>device</var> <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="match a device filter" data-noexport id="match-a-device-filter">matches a device
filter</dfn> <var>filter</var> if the following steps return <code>match</code>:</p>
   <ol>
    <li data-md>
     <p>Let <var>deviceDesc</var> be <var>device</var>’s <a data-link-type="dfn" href="#device-descriptor" id="ref-for-device-descriptor">device descriptor</a>.</p>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-vendorid" id="ref-for-dom-usbdevicefilter-vendorid">vendorId</a></code></code> is present and <code><var>deviceDesc</var>.idVendor</code> does not equal <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-vendorid" id="ref-for-dom-usbdevicefilter-vendorid①">vendorId</a></code></code>, return <code>mismatch</code>.</p>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-productid" id="ref-for-dom-usbdevicefilter-productid">productId</a></code></code> is present and <code><var>deviceDesc</var>.idProduct</code> does not equal <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-productid" id="ref-for-dom-usbdevicefilter-productid①">productId</a></code></code>, return <code>mismatch</code>.</p>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-serialnumber" id="ref-for-dom-usbdevicefilter-serialnumber">serialNumber</a></code></code> is present then,
 let <var>serialNumber</var> be the <a data-link-type="dfn" href="#string-descriptor" id="ref-for-string-descriptor">string descriptor</a> with index <code><var>deviceDesc</var>.iSerialNumber</code>. If <var>device</var> returns an error when
 requesting <var>serialNumber</var> or <var>serialNumber</var> is not equal to <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-serialnumber" id="ref-for-dom-usbdevicefilter-serialnumber①">serialNumber</a></code></code>, return <code>mismatch</code>.</p>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-classcode" id="ref-for-dom-usbdevicefilter-classcode">classCode</a></code></code> is present and,
 for any of <var>device</var>’s interface’s <var>interface</var>, <var>interface</var> <a data-link-type="dfn" href="#matches-the-interface-filter" id="ref-for-matches-the-interface-filter">matches
 the interface filter</a> <var>filter</var>, return <code>match</code>.</p>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-classcode" id="ref-for-dom-usbdevicefilter-classcode①">classCode</a></code></code> is present and <code><var>deviceDesc</var>.bDeviceClass</code> is not equal to <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-classcode" id="ref-for-dom-usbdevicefilter-classcode②">classCode</a></code></code>, return <code>mismatch</code>.</p>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-subclasscode" id="ref-for-dom-usbdevicefilter-subclasscode">subclassCode</a></code></code> is present and <code><var>deviceDesc</var>.bDeviceSubClass</code> is not equal to <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-subclasscode" id="ref-for-dom-usbdevicefilter-subclasscode①">subclassCode</a></code></code>, return <code>mismatch</code>.</p>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-protocolcode" id="ref-for-dom-usbdevicefilter-protocolcode">protocolCode</a></code></code> is present and <code><var>deviceDesc</var>.bDeviceProtocol</code> is not equal to <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-protocolcode" id="ref-for-dom-usbdevicefilter-protocolcode①">protocolCode</a></code></code>, return <code>mismatch</code>.</p>
    <li data-md>
     <p>Return <code>match</code>.</p>
   </ol>
   <p class="note" role="note"><span>Note:</span> The steps above treat the <code>bDeviceClass</code>, <code>bDeviceSubClass</code> and <code>bDeviceProtocol</code> fields of the <a data-link-type="dfn" href="#device-descriptor" id="ref-for-device-descriptor①">device descriptor</a> as though they were part of an <a data-link-type="dfn" href="#interface-descriptor" id="ref-for-interface-descriptor">interface
descriptor</a> which is also compared against the provided filter.</p>
   <p>A USB interface <var>interface</var> <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="matches the interface filter" data-noexport id="matches-the-interface-filter">matches
an interface filter</dfn> <var>filter</var> if the following steps return <code>match</code>:</p>
   <ol>
    <li data-md>
     <p>Let <var>desc</var> be <var>interface</var>’s <a data-link-type="dfn" href="#interface-descriptor" id="ref-for-interface-descriptor①">interface descriptor</a>.</p>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-classcode" id="ref-for-dom-usbdevicefilter-classcode③">classCode</a></code></code> is present and <code><var>desc</var>.bInterfaceClass</code> is not equal to <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-classcode" id="ref-for-dom-usbdevicefilter-classcode④">classCode</a></code></code>, return <code>mismatch</code>.</p>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-subclasscode" id="ref-for-dom-usbdevicefilter-subclasscode②">subclassCode</a></code></code> is present and <code><var>desc</var>.bInterfaceSubClass</code> is not equal to <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-subclasscode" id="ref-for-dom-usbdevicefilter-subclasscode③">subclassCode</a></code></code>, return <code>mismatch</code>.</p>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-protocolcode" id="ref-for-dom-usbdevicefilter-protocolcode②">protocolCode</a></code></code> is present and <code><var>desc</var>.bInterfaceProtocol</code> is not equal to <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-protocolcode" id="ref-for-dom-usbdevicefilter-protocolcode③">protocolCode</a></code></code>, return <code>mismatch</code>.</p>
    <li data-md>
     <p>Return <code>match</code>.</p>
   </ol>
   <p>A <code class="idl"><a data-link-type="idl" href="#dictdef-usbdevicefilter" id="ref-for-dictdef-usbdevicefilter①">USBDeviceFilter</a></code> <var>filter</var> <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="is not a valid filter" data-noexport id="is-not-a-valid-filter">is valid</dfn> if the following steps
return <code>valid</code>:</p>
   <ol>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-productid" id="ref-for-dom-usbdevicefilter-productid②">productId</a></code></code> is present and <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-vendorid" id="ref-for-dom-usbdevicefilter-vendorid②">vendorId</a></code></code> is not present,
 return <code>invalid</code>.</p>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-subclasscode" id="ref-for-dom-usbdevicefilter-subclasscode④">subclassCode</a></code></code> is present and <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-classcode" id="ref-for-dom-usbdevicefilter-classcode⑤">classCode</a></code></code> is not present,
 return <code>invalid</code>.</p>
    <li data-md>
     <p>If <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-protocolcode" id="ref-for-dom-usbdevicefilter-protocolcode④">protocolCode</a></code></code> is present and <code><var>filter</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevicefilter-subclasscode" id="ref-for-dom-usbdevicefilter-subclasscode⑤">subclassCode</a></code></code> is not present,
 return <code>invalid</code>.</p>
    <li data-md>
     <p>Return <code>valid</code>.</p>
   </ol>
   <p>The UA MUST be able to <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="enumerate-all-devices-attached-to-the-system">enumerate all devices attached to the system</dfn>.
It is, however NOT required to perform this work each time an algorithm
requests an enumeration. The UA MAY cache the result of the first enumeration
it performs and then begin monitoring for device connection and disconnection
events, adding connected devices to its cached enumeration and removing
disconnected devices. This mode of operation is preferred as it reduces the
number of operating system calls made and amount of bus traffic generated by
the <code class="idl"><a data-link-type="idl" href="#dom-usb-getdevices" id="ref-for-dom-usb-getdevices①">getDevices()</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-usb-requestdevice" id="ref-for-dom-usb-requestdevice③">requestDevice()</a></code> methods.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usb-onconnect" id="ref-for-dom-usb-onconnect">onconnect</a></code> attribute is an Event handler IDL attribute for the <a data-link-type="dfn" href="#connect" id="ref-for-connect①">connect</a> event type.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usb-ondisconnect" id="ref-for-dom-usb-ondisconnect">ondisconnect</a></code> attribute is an Event handler IDL attribute for the <a data-link-type="dfn" href="#disconnect" id="ref-for-disconnect①">disconnect</a> event type.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usb-getdevices" id="ref-for-dom-usb-getdevices②">getDevices()</a></code> method, when invoked, MUST return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects">Promise</a></code> and
run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel">in parallel</a>:</p>
   <ol>
    <li data-md>
     <p><a data-link-type="dfn" href="#enumerate-all-devices-attached-to-the-system" id="ref-for-enumerate-all-devices-attached-to-the-system">Enumerate all devices attached to the system</a>. Let this result be <var>enumerationResult</var>.</p>
    <li data-md>
     <p>Let <var>devices</var> be a new empty <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-array-objects" id="ref-for-sec-array-objects">Array</a></code>.</p>
    <li data-md>
     <p>For each <var>device</var> in <var>enumerationResult</var>:</p>
     <ol>
      <li data-md>
       <p>If this is the first call to this method, <a data-link-type="dfn" href="#check-permissions-for-device" id="ref-for-check-permissions-for-device">check permissions for <var>device</var></a>.</p>
      <li data-md>
       <p>Search for an element <var>allowedDevice</var> in <code><var>storage</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissionstorage-alloweddevices" id="ref-for-dom-usbpermissionstorage-alloweddevices">allowedDevices</a></code></code> where <var>device</var> is in <var>allowedDevice</var>@<code class="idl"><a data-link-type="idl" href="#dom-allowedusbdevice-devices-slot" id="ref-for-dom-allowedusbdevice-devices-slot">[[devices]]</a></code>. If no such element
exists, continue to the next <var>device</var>.</p>
      <li data-md>
       <p>Add the <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice②">USBDevice</a></code> object representing <var>device</var> to <var>devices</var>.</p>
     </ol>
    <li data-md>
     <p><a data-link-type="dfn">Resolve</a> <var>promise</var> with <var>devices</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usb-requestdevice" id="ref-for-dom-usb-requestdevice④">requestDevice()</a></code> method, when invoked, MUST run the following steps:</p>
   <ol>
    <li data-md>
     <p><a data-link-type="dfn" href="https://w3c.github.io/permissions/#request-permission-to-use" id="ref-for-request-permission-to-use">Request permission to use</a> the following descriptor,</p>
<pre class="highlight"><c- p>{</c->
  name<c- o>:</c-> <c- u>"usb"</c->
  filters<c- o>:</c-> <var>options</var><c- p>.</c-><a data-link-type="idl" href="#dom-usbdevicerequestoptions-filters" id="ref-for-dom-usbdevicerequestoptions-filters">filters</a>
<c- p>}</c->
</pre>
     <p>Let <var>permissionResult</var> be the resulting <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects①">Promise</a></code>.</p>
    <li data-md>
     <p><a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#upon-fulfillment" id="ref-for-upon-fulfillment">Upon fulfillment</a> of <var>permissionResult</var> with <var>result</var> run the
 following steps:</p>
     <ol>
      <li data-md>
       <p>If <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissionresult-devices" id="ref-for-dom-usbpermissionresult-devices">devices</a></code></code> is empty,
  throw a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror">NotFoundError</a></code> and abort these steps.</p>
      <li data-md>
       <p>Return <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissionresult-devices" id="ref-for-dom-usbpermissionresult-devices①">devices</a></code>[0]</code>.</p>
     </ol>
   </ol>
   <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="request-the-usb-permission">request the "usb" permission</dfn>, given a <code class="idl"><a data-link-type="idl" href="#dictdef-usbpermissionstorage" id="ref-for-dictdef-usbpermissionstorage">USBPermissionStorage</a></code> <var>storage</var>, a <code class="idl"><a data-link-type="idl" href="#dictdef-usbpermissiondescriptor" id="ref-for-dictdef-usbpermissiondescriptor">USBPermissionDescriptor</a></code> <var>options</var> and a <code class="idl"><a data-link-type="idl" href="#usbpermissionresult" id="ref-for-usbpermissionresult">USBPermissionResult</a></code> <var>status</var>, the UA MUST return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects②">Promise</a></code> <var>promise</var> and run the following
steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel①">in parallel</a>:</p>
   <ol>
    <li data-md>
     <p>For each <var>filter</var> in <code><var>options</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissiondescriptor-filters" id="ref-for-dom-usbpermissiondescriptor-filters">filters</a></code></code> if <var>filter</var> <a data-link-type="dfn" href="#is-not-a-valid-filter" id="ref-for-is-not-a-valid-filter">is not a valid filter</a> <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror">TypeError</a></code> and abort these steps.</p>
    <li data-md>
     <p>If the algorithm is not <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation" id="ref-for-triggered-by-user-activation">triggered by user activation</a>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#securityerror" id="ref-for-securityerror">SecurityError</a></code> and abort these steps.</p>
    <li data-md>
     <p>Set <code><var>status</var>.<code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#dom-permissionstatus-state" id="ref-for-dom-permissionstatus-state">state</a></code></code> to `"ask"`.</p>
    <li data-md>
     <p><a data-link-type="dfn" href="#enumerate-all-devices-attached-to-the-system" id="ref-for-enumerate-all-devices-attached-to-the-system①">Enumerate all devices attached to the system</a>. Let this result be <var>enumerationResult</var>.</p>
    <li data-md>
     <p>Remove devices from <var>enumerationResult</var> if they do not <a data-link-type="dfn" href="#match-a-device-filter" id="ref-for-match-a-device-filter">match a device
 filter</a> in <code><var>options</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissiondescriptor-filters" id="ref-for-dom-usbpermissiondescriptor-filters①">filters</a></code></code>.</p>
    <li data-md>
     <p>Display a prompt to the user requesting they select a device from <var>enumerationResult</var>. The UA SHOULD show a human-readable name for each
 device.</p>
    <li data-md>
     <p>Wait for the user to have selected a <var>device</var> or cancelled the
 prompt.</p>
    <li data-md>
     <p>If the user cancels the prompt, set <code><var>status</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissionresult-devices" id="ref-for-dom-usbpermissionresult-devices②">devices</a></code></code> to an empty <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-frozen-array" id="ref-for-idl-frozen-array">FrozenArray</a></code>, <a data-link-type="dfn">resolve</a> <var>promise</var> with <code>undefined</code>,
 and abort these steps.</p>
    <li data-md>
     <p><a data-link-type="dfn" href="#add-device-to-storage" id="ref-for-add-device-to-storage">Add <var>device</var> to <var>storage</var></a>.</p>
    <li data-md>
     <p>Let <var>deviceObj</var> be the <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice③">USBDevice</a></code> object representing <var>device</var>.</p>
    <li data-md>
     <p>Set <code><var>status</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissionresult-devices" id="ref-for-dom-usbpermissionresult-devices③">devices</a></code></code> to a new <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-frozen-array" id="ref-for-idl-frozen-array①">FrozenArray</a></code> containing <var>deviceObj</var> as its only element.</p>
    <li data-md>
     <p><a data-link-type="dfn">Resolve</a> <var>promise</var> with <code>undefined</code>.</p>
   </ol>
   <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="add device to storage" data-noexport id="add-device-to-storage">add an allowed <a data-link-type="dfn" href="#usb-device" id="ref-for-usb-device">USB device</a></dfn> <var>device</var> to <code class="idl"><a data-link-type="idl" href="#dictdef-usbpermissionstorage" id="ref-for-dictdef-usbpermissionstorage①">USBPermissionStorage</a></code> <var>storage</var>, the UA MUST run the following
steps:</p>
   <ol>
    <li data-md>
     <p>Search for an element <var>allowedDevice</var> in <code><var>storage</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissionstorage-alloweddevices" id="ref-for-dom-usbpermissionstorage-alloweddevices①">allowedDevices</a></code></code> where <var>device</var> is in <var>allowedDevice</var>@<code class="idl"><a data-link-type="idl" href="#dom-allowedusbdevice-devices-slot" id="ref-for-dom-allowedusbdevice-devices-slot①">[[devices]]</a></code>. If one is found, abort
 these steps.</p>
    <li data-md>
     <p>Let <var>vendorId</var> and <var>productId</var> be <var>device</var>’s <a data-link-type="dfn" href="#vendor-id" id="ref-for-vendor-id">vendor ID</a> and <a data-link-type="dfn" href="#product-id" id="ref-for-product-id">product ID</a>.</p>
    <li data-md>
     <p>Let <var>serialNumber</var> be <var>device</var>’s <a data-link-type="dfn" href="#serial-number" id="ref-for-serial-number">serial number</a> if it has one,
 otherwise <code>undefined</code>.</p>
    <li data-md>
     <p>Append <code>{ vendorId: <var>vendorId</var>, productId: <var>productId</var>, serialNumber: <var>serialNumber</var> }</code>,
 with a <code class="idl"><a data-link-type="idl" href="#dom-allowedusbdevice-devices-slot" id="ref-for-dom-allowedusbdevice-devices-slot②">[[devices]]</a></code> internal slot containing a single entry <var>device</var> to <code><var>storage</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissionstorage-alloweddevices" id="ref-for-dom-usbpermissionstorage-alloweddevices②">allowedDevices</a></code></code>.</p>
   </ol>
   <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="check permissions for device" data-noexport id="check-permissions-for-device">check permissions for a new <a data-link-type="dfn" href="#usb-device" id="ref-for-usb-device①">USB device</a></dfn> <var>device</var>, given a <code class="idl"><a data-link-type="idl" href="#dictdef-usbpermissionstorage" id="ref-for-dictdef-usbpermissionstorage②">USBPermissionStorage</a></code> <var>storage</var>,
the UA MUST run the following steps:</p>
   <ol>
    <li data-md>
     <p>Let <var>vendorId</var> and <var>productId</var> be <var>device</var>’s <a data-link-type="dfn" href="#vendor-id" id="ref-for-vendor-id①">vendor ID</a> and <a data-link-type="dfn" href="#product-id" id="ref-for-product-id①">product ID</a>.</p>
    <li data-md>
     <p>Let <var>serialNumber</var> be <var>device</var>’s if it has one, otherwise <code>undefined</code>.</p>
    <li data-md>
     <p>Search for an element <var>allowedDevice</var> in <code><var>storage</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissionstorage-alloweddevices" id="ref-for-dom-usbpermissionstorage-alloweddevices③">allowedDevices</a></code></code> where:</p>
     <ul>
      <li data-md>
       <p><code><var>allowedDevice</var>.<code class="idl"><a data-link-type="idl" href="#dom-allowedusbdevice-vendorid" id="ref-for-dom-allowedusbdevice-vendorid">vendorId</a></code></code> equals <var>vendorId</var>.</p>
      <li data-md>
       <p><code><var>allowedDevice</var>.<code class="idl"><a data-link-type="idl" href="#dom-allowedusbdevice-productid" id="ref-for-dom-allowedusbdevice-productid">productId</a></code></code> equals <var>productId</var>.</p>
      <li data-md>
       <p><code><var>allowedDevice</var>.<code class="idl"><a data-link-type="idl" href="#dom-allowedusbdevice-serialnumber" id="ref-for-dom-allowedusbdevice-serialnumber">serialNumber</a></code></code> equals <var>serialNumber</var>.</p>
     </ul>
    <li data-md>
     <p>If no such element exists, return <code>null</code>.</p>
    <li data-md>
     <p>Add <var>device</var> to <var>allowedDevice</var>@<code class="idl"><a data-link-type="idl" href="#dom-allowedusbdevice-devices-slot" id="ref-for-dom-allowedusbdevice-devices-slot③">[[devices]]</a></code>.</p>
    <li data-md>
     <p>Return <var>allowedDevice</var>.</p>
   </ol>
   <h3 class="heading settled" data-level="5.1" id="events"><span class="secno">5.1. </span><span class="content">Events</span><a class="self-link" href="#events"></a></h3>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-usbconnectioneventinit"><code><c- g>USBConnectionEventInit</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit"><c- n>EventInit</c-></a> {
    <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#usbdevice" id="ref-for-usbdevice④"><c- n>USBDevice</c-></a> <dfn class="idl-code" data-dfn-for="USBConnectionEventInit" data-dfn-type="dict-member" data-export data-type="USBDevice " id="dom-usbconnectioneventinit-device"><code><c- g>device</c-></code><a class="self-link" href="#dom-usbconnectioneventinit-device"></a></dfn>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed④"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext③"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbconnectionevent"><code><c- g>USBConnectionEvent</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event"><c- n>Event</c-></a> {
  <dfn class="idl-code" data-dfn-for="USBConnectionEvent" data-dfn-type="constructor" data-export data-lt="USBConnectionEvent(type, eventInitDict)|constructor(type, eventInitDict)" id="dom-usbconnectionevent-usbconnectionevent"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-usbconnectionevent-usbconnectionevent"></a></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString①"><c- b>DOMString</c-></a> <dfn class="idl-code" data-dfn-for="USBConnectionEvent/USBConnectionEvent(type, eventInitDict), USBConnectionEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-usbconnectionevent-usbconnectionevent-type-eventinitdict-type"><code><c- g>type</c-></code><a class="self-link" href="#dom-usbconnectionevent-usbconnectionevent-type-eventinitdict-type"></a></dfn>, <a class="n" data-link-type="idl-name" href="#dictdef-usbconnectioneventinit" id="ref-for-dictdef-usbconnectioneventinit"><c- n>USBConnectionEventInit</c-></a> <dfn class="idl-code" data-dfn-for="USBConnectionEvent/USBConnectionEvent(type, eventInitDict), USBConnectionEvent/constructor(type, eventInitDict)" data-dfn-type="argument" data-export id="dom-usbconnectionevent-usbconnectionevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code><a class="self-link" href="#dom-usbconnectionevent-usbconnectionevent-type-eventinitdict-eventinitdict"></a></dfn>);
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject②"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#usbdevice" id="ref-for-usbdevice⑤"><c- n>USBDevice</c-></a> <dfn class="idl-code" data-dfn-for="USBConnectionEvent" data-dfn-type="attribute" data-export data-readonly data-type="USBDevice" id="dom-usbconnectionevent-device"><code><c- g>device</c-></code><a class="self-link" href="#dom-usbconnectionevent-device"></a></dfn>;
};
</pre>
   <p>When the UA detects a new <a data-link-type="dfn" href="#usb-device" id="ref-for-usb-device②">USB device</a> <var>device</var> connected to the host it
MUST perform the following steps for each script execution environment:</p>
   <ol>
    <li data-md>
     <p>Let <var>storage</var> be the <code class="idl"><a data-link-type="idl" href="#dictdef-usbpermissionstorage" id="ref-for-dictdef-usbpermissionstorage③">USBPermissionStorage</a></code> object in the current
 script execution environment.</p>
    <li data-md>
     <p><a data-link-type="dfn" href="#check-permissions-for-device" id="ref-for-check-permissions-for-device①">Check permissions for <var>device</var></a> with <var>storage</var> and let <var>allowedDevice</var> be the result.</p>
    <li data-md>
     <p>If <var>allowedDevice</var> is <code>null</code>, abort these steps.</p>
    <li data-md>
     <p>Let <var>deviceObj</var> be the <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice⑥">USBDevice</a></code> object representing <var>device</var>.</p>
    <li data-md>
     <p>Let <var>event</var> be a new <code class="idl"><a data-link-type="idl" href="#usbconnectionevent" id="ref-for-usbconnectionevent">USBConnectionEvent</a></code>, with the <code>device</code> attribute set to <var>deviceObj</var>.</p>
    <li data-md>
     <p>Fire an event named <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="connect">connect</dfn> on <code class="idl"><a data-link-type="idl" href="#dom-navigator-usb" id="ref-for-dom-navigator-usb">usb</a></code>, using <var>event</var> as the event object.</p>
   </ol>
   <p>When the UA detects a <a data-link-type="dfn" href="#usb-device" id="ref-for-usb-device③">USB device</a> <var>device</var> has been disconnected from the
host it MUST perform the following steps for each script execution environment:</p>
   <ol>
    <li data-md>
     <p>Let <var>storage</var> be the <code class="idl"><a data-link-type="idl" href="#dictdef-usbpermissionstorage" id="ref-for-dictdef-usbpermissionstorage④">USBPermissionStorage</a></code> object in the current
 script execution environment.</p>
    <li data-md>
     <p>Search for an element <var>allowedDevice</var> in <code><var>storage</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissionstorage-alloweddevices" id="ref-for-dom-usbpermissionstorage-alloweddevices④">allowedDevices</a></code></code> where <var>device</var> is in <var>allowedDevice</var>@<code class="idl"><a data-link-type="idl" href="#dom-allowedusbdevice-devices-slot" id="ref-for-dom-allowedusbdevice-devices-slot④">[[devices]]</a></code>, if no such element exists,
 abort these steps.</p>
    <li data-md>
     <p>Remove <var>device</var> from <var>allowedDevice</var>@<code class="idl"><a data-link-type="idl" href="#dom-allowedusbdevice-devices-slot" id="ref-for-dom-allowedusbdevice-devices-slot⑤">[[devices]]</a></code>.</p>
    <li data-md>
     <p>If <code><var>allowedDevice</var>.<code class="idl"><a data-link-type="idl" href="#dom-allowedusbdevice-serialnumber" id="ref-for-dom-allowedusbdevice-serialnumber①">serialNumber</a></code></code> is <code>undefined</code> and <var>allowedDevice</var>@<code class="idl"><a data-link-type="idl" href="#dom-allowedusbdevice-devices-slot" id="ref-for-dom-allowedusbdevice-devices-slot⑥">[[devices]]</a></code> is empty remove <var>allowedDevice</var> from <code><var>storage</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissionstorage-alloweddevices" id="ref-for-dom-usbpermissionstorage-alloweddevices⑤">allowedDevices</a></code></code>.</p>
    <li data-md>
     <p>Let <var>device</var> be the <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice⑦">USBDevice</a></code> object representing <var>device</var>.</p>
    <li data-md>
     <p>Let <var>event</var> be a new <code class="idl"><a data-link-type="idl" href="#usbconnectionevent" id="ref-for-usbconnectionevent①">USBConnectionEvent</a></code>, with the <code>device</code> attribute set to <var>device</var>.</p>
    <li data-md>
     <p>Fire an event named <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="disconnect">disconnect</dfn> on <code class="idl"><a data-link-type="idl" href="#dom-navigator-usb" id="ref-for-dom-navigator-usb①">usb</a></code>, using <var>event</var> as the event object.</p>
   </ol>
   <h2 class="heading settled" data-level="6" id="device-usage"><span class="secno">6. </span><span class="content">Device Usage</span><a class="self-link" href="#device-usage"></a></h2>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑤"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->), <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext④"><c- g>SecureContext</c-></a>]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbdevice"><code><c- g>USBDevice</c-></code></dfn> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbdevice-usbversionmajor"><code><c- g>usbVersionMajor</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet④"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbdevice-usbversionminor"><code><c- g>usbVersionMinor</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet⑤"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbdevice-usbversionsubminor"><code><c- g>usbVersionSubminor</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet⑥"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbdevice-deviceclass"><code><c- g>deviceClass</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet⑦"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbdevice-devicesubclass"><code><c- g>deviceSubclass</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet⑧"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbdevice-deviceprotocol"><code><c- g>deviceProtocol</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short②"><c- b>unsigned</c-> <c- b>short</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="unsigned short" id="dom-usbdevice-vendorid"><code><c- g>vendorId</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short③"><c- b>unsigned</c-> <c- b>short</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="unsigned short" id="dom-usbdevice-productid"><code><c- g>productId</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet⑨"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbdevice-deviceversionmajor"><code><c- g>deviceVersionMajor</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①⓪"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbdevice-deviceversionminor"><code><c- g>deviceVersionMinor</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①①"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbdevice-deviceversionsubminor"><code><c- g>deviceVersionSubminor</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString②"><c- b>DOMString</c-></a>? <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="DOMString?" id="dom-usbdevice-manufacturername"><code><c- g>manufacturerName</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString③"><c- b>DOMString</c-></a>? <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="DOMString?" id="dom-usbdevice-productname"><code><c- g>productName</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString④"><c- b>DOMString</c-></a>? <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="DOMString?" id="dom-usbdevice-serialnumber"><code><c- g>serialNumber</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#usbconfiguration" id="ref-for-usbconfiguration"><c- n>USBConfiguration</c-></a>? <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="USBConfiguration?" id="dom-usbdevice-configuration"><code><c- g>configuration</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbconfiguration" id="ref-for-usbconfiguration①"><c- n>USBConfiguration</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="FrozenArray<USBConfiguration>" id="dom-usbdevice-configurations"><code><c- g>configurations</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="attribute" data-export data-readonly data-type="boolean" id="dom-usbdevice-opened"><code><c- g>opened</c-></code></dfn>;
  <c- b>Promise</c->&lt;<c- b>void</c->> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="open()" id="dom-usbdevice-open"><code><c- g>open</c-></code></dfn>();
  <c- b>Promise</c->&lt;<c- b>void</c->> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="close()" id="dom-usbdevice-close"><code><c- g>close</c-></code></dfn>();
  <c- b>Promise</c->&lt;<c- b>void</c->> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="selectConfiguration(configurationValue)" id="dom-usbdevice-selectconfiguration"><code><c- g>selectConfiguration</c-></code></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①②"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/selectConfiguration(configurationValue)" data-dfn-type="argument" data-export id="dom-usbdevice-selectconfiguration-configurationvalue-configurationvalue"><code><c- g>configurationValue</c-></code><a class="self-link" href="#dom-usbdevice-selectconfiguration-configurationvalue-configurationvalue"></a></dfn>);
  <c- b>Promise</c->&lt;<c- b>void</c->> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="claimInterface(interfaceNumber)" id="dom-usbdevice-claiminterface"><code><c- g>claimInterface</c-></code></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①③"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/claimInterface(interfaceNumber)" data-dfn-type="argument" data-export id="dom-usbdevice-claiminterface-interfacenumber-interfacenumber"><code><c- g>interfaceNumber</c-></code><a class="self-link" href="#dom-usbdevice-claiminterface-interfacenumber-interfacenumber"></a></dfn>);
  <c- b>Promise</c->&lt;<c- b>void</c->> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="releaseInterface(interfaceNumber)" id="dom-usbdevice-releaseinterface"><code><c- g>releaseInterface</c-></code></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①④"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/releaseInterface(interfaceNumber)" data-dfn-type="argument" data-export id="dom-usbdevice-releaseinterface-interfacenumber-interfacenumber"><code><c- g>interfaceNumber</c-></code><a class="self-link" href="#dom-usbdevice-releaseinterface-interfacenumber-interfacenumber"></a></dfn>);
  <c- b>Promise</c->&lt;<c- b>void</c->> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="selectAlternateInterface(interfaceNumber, alternateSetting)" id="dom-usbdevice-selectalternateinterface"><code><c- g>selectAlternateInterface</c-></code></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①⑤"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/selectAlternateInterface(interfaceNumber, alternateSetting)" data-dfn-type="argument" data-export id="dom-usbdevice-selectalternateinterface-interfacenumber-alternatesetting-interfacenumber"><code><c- g>interfaceNumber</c-></code><a class="self-link" href="#dom-usbdevice-selectalternateinterface-interfacenumber-alternatesetting-interfacenumber"></a></dfn>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①⑥"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/selectAlternateInterface(interfaceNumber, alternateSetting)" data-dfn-type="argument" data-export id="dom-usbdevice-selectalternateinterface-interfacenumber-alternatesetting-alternatesetting"><code><c- g>alternateSetting</c-></code><a class="self-link" href="#dom-usbdevice-selectalternateinterface-interfacenumber-alternatesetting-alternatesetting"></a></dfn>);
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbintransferresult" id="ref-for-usbintransferresult"><c- n>USBInTransferResult</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="controlTransferIn(setup, length)" id="dom-usbdevice-controltransferin"><code><c- g>controlTransferIn</c-></code></dfn>(<a class="n" data-link-type="idl-name" href="#dictdef-usbcontroltransferparameters" id="ref-for-dictdef-usbcontroltransferparameters"><c- n>USBControlTransferParameters</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/controlTransferIn(setup, length)" data-dfn-type="argument" data-export id="dom-usbdevice-controltransferin-setup-length-setup"><code><c- g>setup</c-></code><a class="self-link" href="#dom-usbdevice-controltransferin-setup-length-setup"></a></dfn>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short④"><c- b>unsigned</c-> <c- b>short</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/controlTransferIn(setup, length)" data-dfn-type="argument" data-export id="dom-usbdevice-controltransferin-setup-length-length"><code><c- g>length</c-></code><a class="self-link" href="#dom-usbdevice-controltransferin-setup-length-length"></a></dfn>);
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbouttransferresult" id="ref-for-usbouttransferresult"><c- n>USBOutTransferResult</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="controlTransferOut(setup, data)|controlTransferOut(setup)" id="dom-usbdevice-controltransferout"><code><c- g>controlTransferOut</c-></code></dfn>(<a class="n" data-link-type="idl-name" href="#dictdef-usbcontroltransferparameters" id="ref-for-dictdef-usbcontroltransferparameters①"><c- n>USBControlTransferParameters</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/controlTransferOut(setup, data), USBDevice/controlTransferOut(setup)" data-dfn-type="argument" data-export id="dom-usbdevice-controltransferout-setup-data-setup"><code><c- g>setup</c-></code><a class="self-link" href="#dom-usbdevice-controltransferout-setup-data-setup"></a></dfn>, <c- b>optional</c-> <a class="n" data-link-type="idl-name" href="https://heycam.github.io/webidl/#BufferSource" id="ref-for-BufferSource"><c- n>BufferSource</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/controlTransferOut(setup, data), USBDevice/controlTransferOut(setup)" data-dfn-type="argument" data-export id="dom-usbdevice-controltransferout-setup-data-data"><code><c- g>data</c-></code><a class="self-link" href="#dom-usbdevice-controltransferout-setup-data-data"></a></dfn>);
  <c- b>Promise</c->&lt;<c- b>void</c->> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="clearHalt(direction, endpointNumber)" id="dom-usbdevice-clearhalt"><code><c- g>clearHalt</c-></code></dfn>(<a class="n" data-link-type="idl-name" href="#enumdef-usbdirection" id="ref-for-enumdef-usbdirection"><c- n>USBDirection</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/clearHalt(direction, endpointNumber)" data-dfn-type="argument" data-export id="dom-usbdevice-clearhalt-direction-endpointnumber-direction"><code><c- g>direction</c-></code><a class="self-link" href="#dom-usbdevice-clearhalt-direction-endpointnumber-direction"></a></dfn>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①⑦"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/clearHalt(direction, endpointNumber)" data-dfn-type="argument" data-export id="dom-usbdevice-clearhalt-direction-endpointnumber-endpointnumber"><code><c- g>endpointNumber</c-></code><a class="self-link" href="#dom-usbdevice-clearhalt-direction-endpointnumber-endpointnumber"></a></dfn>);
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbintransferresult" id="ref-for-usbintransferresult①"><c- n>USBInTransferResult</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="transferIn(endpointNumber, length)" id="dom-usbdevice-transferin"><code><c- g>transferIn</c-></code></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①⑧"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/transferIn(endpointNumber, length)" data-dfn-type="argument" data-export id="dom-usbdevice-transferin-endpointnumber-length-endpointnumber"><code><c- g>endpointNumber</c-></code><a class="self-link" href="#dom-usbdevice-transferin-endpointnumber-length-endpointnumber"></a></dfn>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/transferIn(endpointNumber, length)" data-dfn-type="argument" data-export id="dom-usbdevice-transferin-endpointnumber-length-length"><code><c- g>length</c-></code><a class="self-link" href="#dom-usbdevice-transferin-endpointnumber-length-length"></a></dfn>);
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbouttransferresult" id="ref-for-usbouttransferresult①"><c- n>USBOutTransferResult</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="transferOut(endpointNumber, data)" id="dom-usbdevice-transferout"><code><c- g>transferOut</c-></code></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①⑨"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/transferOut(endpointNumber, data)" data-dfn-type="argument" data-export id="dom-usbdevice-transferout-endpointnumber-data-endpointnumber"><code><c- g>endpointNumber</c-></code><a class="self-link" href="#dom-usbdevice-transferout-endpointnumber-data-endpointnumber"></a></dfn>, <a class="n" data-link-type="idl-name" href="https://heycam.github.io/webidl/#BufferSource" id="ref-for-BufferSource①"><c- n>BufferSource</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/transferOut(endpointNumber, data)" data-dfn-type="argument" data-export id="dom-usbdevice-transferout-endpointnumber-data-data"><code><c- g>data</c-></code><a class="self-link" href="#dom-usbdevice-transferout-endpointnumber-data-data"></a></dfn>);
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbisochronousintransferresult" id="ref-for-usbisochronousintransferresult"><c- n>USBIsochronousInTransferResult</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="isochronousTransferIn(endpointNumber, packetLengths)" id="dom-usbdevice-isochronoustransferin"><code><c- g>isochronousTransferIn</c-></code></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②⓪"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/isochronousTransferIn(endpointNumber, packetLengths)" data-dfn-type="argument" data-export id="dom-usbdevice-isochronoustransferin-endpointnumber-packetlengths-endpointnumber"><code><c- g>endpointNumber</c-></code><a class="self-link" href="#dom-usbdevice-isochronoustransferin-endpointnumber-packetlengths-endpointnumber"></a></dfn>, <c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long①"><c- b>unsigned</c-> <c- b>long</c-></a>> <dfn class="idl-code" data-dfn-for="USBDevice/isochronousTransferIn(endpointNumber, packetLengths)" data-dfn-type="argument" data-export id="dom-usbdevice-isochronoustransferin-endpointnumber-packetlengths-packetlengths"><code><c- g>packetLengths</c-></code><a class="self-link" href="#dom-usbdevice-isochronoustransferin-endpointnumber-packetlengths-packetlengths"></a></dfn>);
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbisochronousouttransferresult" id="ref-for-usbisochronousouttransferresult"><c- n>USBIsochronousOutTransferResult</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="isochronousTransferOut(endpointNumber, data, packetLengths)" id="dom-usbdevice-isochronoustransferout"><code><c- g>isochronousTransferOut</c-></code></dfn>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②①"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/isochronousTransferOut(endpointNumber, data, packetLengths)" data-dfn-type="argument" data-export id="dom-usbdevice-isochronoustransferout-endpointnumber-data-packetlengths-endpointnumber"><code><c- g>endpointNumber</c-></code><a class="self-link" href="#dom-usbdevice-isochronoustransferout-endpointnumber-data-packetlengths-endpointnumber"></a></dfn>, <a class="n" data-link-type="idl-name" href="https://heycam.github.io/webidl/#BufferSource" id="ref-for-BufferSource②"><c- n>BufferSource</c-></a> <dfn class="idl-code" data-dfn-for="USBDevice/isochronousTransferOut(endpointNumber, data, packetLengths)" data-dfn-type="argument" data-export id="dom-usbdevice-isochronoustransferout-endpointnumber-data-packetlengths-data"><code><c- g>data</c-></code><a class="self-link" href="#dom-usbdevice-isochronoustransferout-endpointnumber-data-packetlengths-data"></a></dfn>, <c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long②"><c- b>unsigned</c-> <c- b>long</c-></a>> <dfn class="idl-code" data-dfn-for="USBDevice/isochronousTransferOut(endpointNumber, data, packetLengths)" data-dfn-type="argument" data-export id="dom-usbdevice-isochronoustransferout-endpointnumber-data-packetlengths-packetlengths"><code><c- g>packetLengths</c-></code><a class="self-link" href="#dom-usbdevice-isochronoustransferout-endpointnumber-data-packetlengths-packetlengths"></a></dfn>);
  <c- b>Promise</c->&lt;<c- b>void</c->> <dfn class="dfn-paneled idl-code" data-dfn-for="USBDevice" data-dfn-type="method" data-export data-lt="reset()" id="dom-usbdevice-reset"><code><c- g>reset</c-></code></dfn>();
};
</pre>
   <div class="example" id="example-9924ab8f">
    <a class="self-link" href="#example-9924ab8f"></a> In this example we imagine a data logging device supporting up to 8 16-bit data
channels. It has a single configuration (<code>bConfigurationValue 1</code>)
with a single interface (<code>bInterfaceNumber 1</code>) with a single
bulk endpoint (<code>bEndpointAddress 0x81</code> which means that it is
endpoint 1 and an IN endpoint). When data is sampled it is available on this
endpoint. The maximum packet size on this endpoint is 16 bytes to support all 8
channels being activated at the same time. To save bus bandwidth, however, any
combination of channels can be activated and deactivated. The packet will only
be the length necessary to transmit the data collected. 
    <p>To get started we open the device, select the first configuration (it only has
one but the operating system may not have already done this during enumeration)
and claim the data logging interface,</p>
<pre class="highlight">await device<c- p>.</c-><a data-link-type="idl" href="#dom-usbdevice-open" id="ref-for-dom-usbdevice-open">open</a><c- p>();</c->
<c- k>if</c-> <c- p>(</c->device<c- p>.</c-><a data-link-type="idl" href="#dom-usbdevice-configuration" id="ref-for-dom-usbdevice-configuration">configuration</a> <c- o>===</c-> <c- kc>null</c-><c- p>)</c->
  await device<c- p>.</c-><a data-link-type="idl" href="#dom-usbdevice-selectconfiguration" id="ref-for-dom-usbdevice-selectconfiguration">selectConfiguration</a><c- p>(</c-><c- mi>1</c-><c- p>);</c->
await device<c- p>.</c-><a data-link-type="idl" href="#dom-usbdevice-claiminterface" id="ref-for-dom-usbdevice-claiminterface①">claimInterface</a><c- p>(</c-><c- mi>1</c-><c- p>);</c->
</pre>
    <p>For this particular application we care about reading from channels 1, 2 and 5
so we issue a <a data-link-type="dfn" href="#control-transfer" id="ref-for-control-transfer②">control transfer</a> to activate these channels,</p>
<pre class="highlight">await device<c- p>.</c-><a data-link-type="idl" href="#dom-usbdevice-controltransferout" id="ref-for-dom-usbdevice-controltransferout">controlTransferOut</a><c- p>({</c->
    <a data-link-type="idl" href="#dom-usbcontroltransferparameters-requesttype" id="ref-for-dom-usbcontroltransferparameters-requesttype">requestType</a><c- o>:</c-> <c- t>'</c-><a data-link-type="idl" href="#dom-usbrequesttype-vendor" id="ref-for-dom-usbrequesttype-vendor"><c- t>vendor</c-></a><c- t>'</c-><c- p>,</c->
    <a data-link-type="idl" href="#dom-usbcontroltransferparameters-recipient" id="ref-for-dom-usbcontroltransferparameters-recipient">recipient</a><c- o>:</c-> <c- t>'</c-><a data-link-type="idl" href="#dom-usbrecipient-interface" id="ref-for-dom-usbrecipient-interface"><c- t>interface</c-></a><c- t>'</c-><c- p>,</c->
    <a data-link-type="idl" href="#dom-usbcontroltransferparameters-request" id="ref-for-dom-usbcontroltransferparameters-request">request</a><c- o>:</c-> <c- mh>0x01</c-><c- p>,</c->  <c- c1>// vendor-specific request: enable channels</c->
    <a data-link-type="idl" href="#dom-usbcontroltransferparameters-value" id="ref-for-dom-usbcontroltransferparameters-value">value</a><c- o>:</c-> <c- mh>0x0013</c-><c- p>,</c->  <c- c1>// 0b00010011 (channels 1, 2 and 5)</c->
    <a data-link-type="idl" href="#dom-usbcontroltransferparameters-index" id="ref-for-dom-usbcontroltransferparameters-index">index</a><c- o>:</c-> <c- mh>0x0001</c->   <c- c1>// Interface 1 is the recipient</c->
<c- p>});</c->
</pre>
    <p>The application may now start polling the device for data. As we only expect
data from 3 channels we request a 6 byte buffer. As long as we receive a
complete buffer the captured values (transmitted in big endian) are printed to
the console log. If the device has encountered an error and signals this by
stalling the endpoint then the error is cleared before continuing,</p>
<pre class="highlight"><c- k>while</c-> <c- p>(</c-><c- kc>true</c-><c- p>)</c-> <c- p>{</c->
  <c- a>let</c-> result <c- o>=</c-> await data<c- p>.</c-><a data-link-type="idl" href="#dom-usbdevice-transferin" id="ref-for-dom-usbdevice-transferin">transferIn</a><c- p>(</c-><c- mi>1</c-><c- p>,</c-> <c- mi>6</c-><c- p>);</c->

  <c- k>if</c-> <c- p>(</c->result<c- p>.</c-><a data-link-type="idl" href="#dom-usbintransferresult-data" id="ref-for-dom-usbintransferresult-data">data</a> <c- o>&amp;&amp;</c-> result<c- p>.</c->data<c- p>.</c->byteLength <c- o>===</c-> <c- mi>6</c-><c- p>)</c-> <c- p>{</c->
    console<c- p>.</c->log<c- p>(</c-><c- t>'Channel 1: '</c-> <c- o>+</c-> result<c- p>.</c->data<c- p>.</c->getUint16<c- p>(</c-><c- mi>0</c-><c- p>));</c->
    console<c- p>.</c->log<c- p>(</c-><c- t>'Channel 2: '</c-> <c- o>+</c-> result<c- p>.</c->data<c- p>.</c->getUint16<c- p>(</c-><c- mi>2</c-><c- p>));</c->
    console<c- p>.</c->log<c- p>(</c-><c- t>'Channel 5: '</c-> <c- o>+</c-> result<c- p>.</c->data<c- p>.</c->getUint16<c- p>(</c-><c- mi>4</c-><c- p>));</c->
  <c- p>}</c->

  <c- k>if</c-> <c- p>(</c->result<c- p>.</c-><a data-link-type="idl" href="#dom-usbintransferresult-status" id="ref-for-dom-usbintransferresult-status">status</a> <c- o>===</c-> <c- t>'stall'</c-><c- p>)</c-> <c- p>{</c->
    console<c- p>.</c->warn<c- p>(</c-><c- t>'Endpoint stalled. Clearing.'</c-><c- p>);</c->
    await device<c- p>.</c-><a data-link-type="idl" href="#dom-usbdevice-clearhalt" id="ref-for-dom-usbdevice-clearhalt">clearHalt</a><c- p>(</c-><c- mi>1</c-><c- p>);</c->
  <c- p>}</c->
<c- p>}</c->
</pre>
   </div>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-usbversionmajor" id="ref-for-dom-usbdevice-usbversionmajor">usbVersionMajor</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-usbversionminor" id="ref-for-dom-usbdevice-usbversionminor">usbVersionMinor</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-usbversionsubminor" id="ref-for-dom-usbdevice-usbversionsubminor">usbVersionSubminor</a></code> attributes declare the USB protocol version
supported by the device. They SHALL correspond to the value of the <code>bcdUSB</code> field of the <a data-link-type="dfn" href="#device-descriptor" id="ref-for-device-descriptor②">device descriptor</a> such that a value of <code>0xJJMN</code> has major version <code>JJ</code>, minor version <code>M</code> and subminor version <code>N</code>.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-deviceclass" id="ref-for-dom-usbdevice-deviceclass">deviceClass</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-devicesubclass" id="ref-for-dom-usbdevice-devicesubclass">deviceSubclass</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-deviceprotocol" id="ref-for-dom-usbdevice-deviceprotocol">deviceProtocol</a></code> attributes declare the communication interface
supported by the device. They MUST correspond respectively to the values of the <code>bDeviceClass</code>, <code>bDeviceSubClass</code> and <code>bDeviceProtocol</code> fields of the <a data-link-type="dfn" href="#device-descriptor" id="ref-for-device-descriptor③">device descriptor</a>.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-vendorid" id="ref-for-dom-usbdevice-vendorid">vendorId</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-productid" id="ref-for-dom-usbdevice-productid">productId</a></code> MUST be equal to the
device’s <a data-link-type="dfn" href="#vendor-id" id="ref-for-vendor-id②">vendor ID</a> and <a data-link-type="dfn" href="#product-id" id="ref-for-product-id②">product ID</a>.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-deviceversionmajor" id="ref-for-dom-usbdevice-deviceversionmajor">deviceVersionMajor</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-deviceversionminor" id="ref-for-dom-usbdevice-deviceversionminor">deviceVersionMinor</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-deviceversionsubminor" id="ref-for-dom-usbdevice-deviceversionsubminor">deviceVersionSubminor</a></code> attributes declare the device release
number as defined by the device manufacturer. It SHALL correspond to the value
of the <code>bcdDevice</code> field of the <a data-link-type="dfn" href="#device-descriptor" id="ref-for-device-descriptor④">device descriptor</a> such that a
value of <code>0xJJMN</code> has major version <code>JJ</code>, minor version <code>M</code> and subminor version <code>N</code>.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-manufacturername" id="ref-for-dom-usbdevice-manufacturername">manufacturerName</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-productname" id="ref-for-dom-usbdevice-productname">productName</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-serialnumber" id="ref-for-dom-usbdevice-serialnumber">serialNumber</a></code> attributes SHOULD contain the values of the <a data-link-type="dfn" href="#string-descriptor" id="ref-for-string-descriptor①">string
descriptors</a> indexed by the <code>iManufacturer</code>, <code>iProduct</code> and <code>iSerialNumber</code> fields of the <a data-link-type="dfn" href="#device-descriptor" id="ref-for-device-descriptor⑤">device descriptor</a> if each is
defined.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-configuration" id="ref-for-dom-usbdevice-configuration①">configuration</a></code> attribute contains the currently selected
configuration for the device and SHALL be one of the configurations listed in <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-configurations" id="ref-for-dom-usbdevice-configurations">configurations</a></code>. It MAY be <code>null</code> if the device is in
an unconfigured state and MUST be updated by <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-selectconfiguration" id="ref-for-dom-usbdevice-selectconfiguration①">selectConfiguration()</a></code>.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-configurations" id="ref-for-dom-usbdevice-configurations①">configurations</a></code> attribute contains a list of configurations
supported by the device. These configurations SHALL be populated from the
configuration descriptors reported by the device and the number of elements in
this list SHALL match the value of the <code>bNumConfigurations</code> field of
the <a data-link-type="dfn" href="#device-descriptor" id="ref-for-device-descriptor⑥">device descriptor</a>.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened">opened</a></code> attribute SHALL be set to <code>true</code> when the
device is opened by the current execution context and SHALL be set to <code>false</code> otherwise.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-open" id="ref-for-dom-usbdevice-open①">open()</a></code> method, when invoked, MUST return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects③">Promise</a></code> <var>promise</var> and run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel②">in parallel</a>:</p>
   <ol>
    <li data-md>
     <p>Let <var>device</var> be the target <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice⑧">USBDevice</a></code> object.</p>
    <li data-md>
     <p>If <var>device</var> is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise②">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror①">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened①">opened</a></code></code> is <code>true</code> <a data-link-type="dfn">resolve</a> <var>promise</var> and abort these steps.</p>
    <li data-md>
     <p>Perform the necessary platform-specific steps to begin a session with the
 device. If these fail for any reason <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise③">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#networkerror" id="ref-for-networkerror">NetworkError</a></code> and abort these steps.</p>
    <li data-md>
     <p>Set <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened②">opened</a></code></code> to <code>true</code> and <a data-link-type="dfn">resolve</a> <var>promise</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-close" id="ref-for-dom-usbdevice-close">close()</a></code> method, when invoked, MUST return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects④">Promise</a></code> <var>promise</var> and run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel③">in parallel</a>:</p>
   <ol>
    <li data-md>
     <p>Let <var>device</var> be the target <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice⑨">USBDevice</a></code> object.</p>
    <li data-md>
     <p>If <var>device</var> is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise④">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror②">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened③">opened</a></code></code> is <code>false</code> <a data-link-type="dfn">resolve</a> <var>promise</var> and abort these steps.</p>
    <li data-md>
     <p>Abort all other algorithms currently running against this device and <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑤">reject</a> their associated promises with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#aborterror" id="ref-for-aborterror">AbortError</a></code>.</p>
    <li data-md>
     <p>Perform the necessary platform-specific steps to release any claimed
 interfaces as if <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-releaseinterface" id="ref-for-dom-usbdevice-releaseinterface">releaseInterface(interfaceNumber)</a></code> had been
 called for each claimed interface.</p>
    <li data-md>
     <p>Perform the necessary platform-specific steps to end the session with the
 device.</p>
    <li data-md>
     <p>Set <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened④">opened</a></code></code> to <code>false</code> and <a data-link-type="dfn">resolve</a> <var>promise</var>.</p>
   </ol>
   <p>When no <a data-link-type="biblio" href="#biblio-ecmascript">[ECMAScript]</a> code can observe an instance of <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice①⓪">USBDevice</a></code> <var>device</var> anymore, the UA SHOULD run <var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-close" id="ref-for-dom-usbdevice-close①">close()</a></code>.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-selectconfiguration" id="ref-for-dom-usbdevice-selectconfiguration②">selectConfiguration(configurationValue)</a></code> method, when invoked,
MUST return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects⑤">Promise</a></code> <var>promise</var> and run the following steps in
parallel:</p>
   <ol>
    <li data-md>
     <p>Let <var>device</var> be the target <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice①①">USBDevice</a></code> object.</p>
    <li data-md>
     <p>If <var>device</var> is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑥">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror③">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>Let <var>configuration</var> be the device configuration with <code>bConfigurationValue</code> equal to <var>configurationValue</var>. If no such
 configuration exists, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑦">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror④">NotFoundError</a></code> and
 abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened⑤">opened</a></code></code> is not equal to <code>true</code> <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑧">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror">InvalidStateError</a></code> and
 abort these steps.</p>
    <li data-md>
     <p>Abort all transfers currently scheduled on endpoints other than the <a data-link-type="dfn" href="#default-endpoint" id="ref-for-default-endpoint">default control pipe</a> and <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑨">reject</a> their associated promises
 with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#aborterror" id="ref-for-aborterror①">AbortError</a></code>.</p>
    <li data-md>
     <p>Issue a <code>SET_CONFIGURATION</code> <a data-link-type="dfn" href="#control-transfer" id="ref-for-control-transfer③">control transfer</a> to the
 device to set <var>configurationValue</var> as its <a data-link-type="dfn" href="#active-configuration" id="ref-for-active-configuration">active configuration</a>.
 If this step fails <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①⓪">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#networkerror" id="ref-for-networkerror①">NetworkError</a></code> and
 abort these steps.</p>
    <li data-md>
     <p>Set <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-configuration" id="ref-for-dom-usbdevice-configuration②">configuration</a></code></code> to <var>configuration</var> and <a data-link-type="dfn">resolve</a> <var>promise</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-claiminterface" id="ref-for-dom-usbdevice-claiminterface②">claimInterface(interfaceNumber)</a></code> method, when invoked, MUST
return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects⑥">Promise</a></code> <var>promise</var> and run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel④">in
parallel</a>:</p>
   <ol>
    <li data-md>
     <p>If the device is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①①">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror⑤">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>Let <var>interface</var> be the interface in the <a data-link-type="dfn" href="#active-configuration" id="ref-for-active-configuration①">active configuration</a> with <code>bInterfaceNumber</code> equal to <var>interfaceNumber</var>. If no such
 interface exists, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①②">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror⑥">NotFoundError</a></code> and
 abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened⑥">opened</a></code></code> is not <code>true</code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①③">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①">InvalidStateError</a></code> and abort these
 steps.</p>
    <li data-md>
     <p>If <code><var>interface</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed">claimed</a></code></code> is <code>true</code>, <a data-link-type="dfn">resolve</a> <var>promise</var> and abort these steps.</p>
    <li data-md>
     <p>Perform the necessary platform-specific steps to request exclusive control
 over <var>interface</var> for the current execution context. If this fails, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①④">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#networkerror" id="ref-for-networkerror②">NetworkError</a></code> and abort these steps.</p>
    <li data-md>
     <p>Set <code><var>interface</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed①">claimed</a></code></code> to <code>true</code> and <a data-link-type="dfn">resolve</a> <var>promise</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-releaseinterface" id="ref-for-dom-usbdevice-releaseinterface①">releaseInterface(interfaceNumber)</a></code> method, when invoked, MUST
return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects⑦">Promise</a></code> <var>promise</var> and run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel⑤">in
parallel</a>:</p>
   <ol>
    <li data-md>
     <p>Let <var>device</var> be the target <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice①②">USBDevice</a></code> object.</p>
    <li data-md>
     <p>If <var>device</var> is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①⑤">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror⑦">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>Let <var>interface</var> be the interface in the <a data-link-type="dfn" href="#active-configuration" id="ref-for-active-configuration②">active configuration</a> with <code>bInterfaceNumber</code> equal to <var>interfaceNumber</var>. If no such
 interface exists, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①⑥">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror⑧">NotFoundError</a></code> and
 abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened⑦">opened</a></code></code> is not <code>true</code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①⑦">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror②">InvalidStateError</a></code> and abort these
 steps.</p>
    <li data-md>
     <p>If <code><var>interface</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed②">claimed</a></code></code> is <code>false</code>, <a data-link-type="dfn">resolve</a> <var>promise</var> and abort these steps.</p>
    <li data-md>
     <p>Perform the necessary platform-specific steps to reliquish exclusive
 control over <var>interface</var>.</p>
    <li data-md>
     <p>Set <code><var>interface</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed③">claimed</a></code></code> to <code>false</code> and <a data-link-type="dfn">resolve</a> <var>promise</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-selectalternateinterface" id="ref-for-dom-usbdevice-selectalternateinterface">selectAlternateInterface(interfaceNumber, alternateSetting)</a></code> method, when invoked, MUST return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects⑧">Promise</a></code> <var>promise</var> and run the
following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel⑥">in parallel</a>:</p>
   <ol>
    <li data-md>
     <p>Let <var>device</var> be the target <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice①③">USBDevice</a></code> object.</p>
    <li data-md>
     <p>If <var>device</var> is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①⑧">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror⑨">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>Let <var>interface</var> be the interface in the <a data-link-type="dfn" href="#active-configuration" id="ref-for-active-configuration③">active configuration</a> with <code>bInterfaceNumber</code> equal to <var>interfaceNumber</var>. If no such
 interface exists, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise①⑨">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror①⓪">NotFoundError</a></code> and
 abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened⑧">opened</a></code></code> or <code><var>interface</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed④">claimed</a></code></code> is not <code>true</code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise②⓪">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror③">InvalidStateError</a></code> and abort these
 steps.</p>
    <li data-md>
     <p>Abort all transfers currently scheduled on endpoints associated with the
 previously selected alternate setting of <var>interface</var> and <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise②①">reject</a> their associated promises with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#aborterror" id="ref-for-aborterror②">AbortError</a></code>.</p>
    <li data-md>
     <p>Issue a <code>SET_INTERFACE</code> <a data-link-type="dfn" href="#control-transfer" id="ref-for-control-transfer④">control transfer</a> to the device
 to set <var>alternateSetting</var> as the current configuration of <var>interface</var>. If
 this step fails <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise②②">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#networkerror" id="ref-for-networkerror③">NetworkError</a></code> and abort
 these steps.</p>
    <li data-md>
     <p><a data-link-type="dfn">Resolve</a> <var>promise</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-controltransferin" id="ref-for-dom-usbdevice-controltransferin">controlTransferIn(setup, length)</a></code> method, when invoked, MUST
return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects⑨">Promise</a></code> <var>promise</var> and run the following steps in
parallel:</p>
   <ol>
    <li data-md>
     <p>Let <var>device</var> be the target <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice①④">USBDevice</a></code> object.</p>
    <li data-md>
     <p>If <var>device</var> is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise②③">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror①①">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened⑨">opened</a></code></code> is not equal to <code>true</code> <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise②④">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror④">InvalidStateError</a></code> and abort these steps.</p>
    <li data-md>
     <p><a data-link-type="dfn" href="#check-the-validity-of-the-control-transfer-parameters" id="ref-for-check-the-validity-of-the-control-transfer-parameters">Check the validity of the control transfer parameters</a> and abort
 these steps if <var>promise</var> is rejected.</p>
    <li data-md>
     <p>If <var>length</var> is greater than 0, let <var>buffer</var> be a host buffer with space
 for <var>length</var> bytes.</p>
    <li data-md>
     <p>Issue a <a data-link-type="dfn" href="#control-transfer" id="ref-for-control-transfer⑤">control transfer</a> to <var>device</var> with the setup packet parameters
 provided in <var>setup</var>, the data transfer direction in <code>bmRequestType</code> set to "device to host" and <code>wLength</code> set to <var>length</var>. If defined also provide <var>buffer</var> as the destination to
 write data received in response to this transfer.</p>
    <li data-md>
     <p>Let <var>bytesTransferred</var> be the number of bytes written to <var>buffer</var>.</p>
    <li data-md>
     <p>Let <var>result</var> be a new <code class="idl"><a data-link-type="idl" href="#usbintransferresult" id="ref-for-usbintransferresult②">USBInTransferResult</a></code>.</p>
    <li data-md>
     <p>If data was received from <var>device</var> create a new <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-ArrayBuffer" id="ref-for-idl-ArrayBuffer">ArrayBuffer</a></code> containing
 the first <var>bytesTransferred</var> bytes of <var>buffer</var> and set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbintransferresult-data" id="ref-for-dom-usbintransferresult-data①">data</a></code></code> to a new <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView">DataView</a></code> constructed over it.</p>
    <li data-md>
     <p>If <var>device</var> responded by stalling the <a data-link-type="dfn" href="#default-endpoint" id="ref-for-default-endpoint①">default control pipe</a> set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbintransferresult-status" id="ref-for-dom-usbintransferresult-status①">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-stall" id="ref-for-dom-usbtransferstatus-stall">"stall"</a></code>.</p>
    <li data-md>
     <p>If <var>device</var> responded with more than <var>length</var> bytes of data set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbintransferresult-status" id="ref-for-dom-usbintransferresult-status②">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-babble" id="ref-for-dom-usbtransferstatus-babble">"babble"</a></code> and
 otherwise set it to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-ok" id="ref-for-dom-usbtransferstatus-ok">"ok"</a></code>.</p>
    <li data-md>
     <p>If the transfer fails for any other reason <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise②⑤">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#networkerror" id="ref-for-networkerror④">NetworkError</a></code> and abort these steps.</p>
    <li data-md>
     <p><a data-link-type="dfn">Resolve</a> <var>promise</var> with <var>result</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-controltransferout" id="ref-for-dom-usbdevice-controltransferout①">controlTransferOut(setup, data)</a></code> method, when invoked, must
return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects①⓪">Promise</a></code> <var>promise</var> and run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel⑦">in
parallel</a>:</p>
   <ol>
    <li data-md>
     <p>If the device is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise②⑥">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror①②">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened①⓪">opened</a></code></code> is not equal to <code>true</code> <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise②⑦">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror⑤">InvalidStateError</a></code> and
 abort these
 steps.</p>
    <li data-md>
     <p><a data-link-type="dfn" href="#check-the-validity-of-the-control-transfer-parameters" id="ref-for-check-the-validity-of-the-control-transfer-parameters①">Check the validity of the control transfer parameters</a> and abort
 these steps if <var>promise</var> is rejected.</p>
    <li data-md>
     <p>Issue a <a data-link-type="dfn" href="#control-transfer" id="ref-for-control-transfer⑥">control transfer</a> with the <a data-link-type="dfn" href="#setup-packet" id="ref-for-setup-packet">setup packet</a> populated by <var>setup</var> and the data transfer direction in <code>bmRequestType</code> set
 to "host to device" and <code>wLength</code> set to <code><var>data</var>.length</code>. Transmit <var>data</var> in the <a data-link-type="dfn" href="#data-stage" id="ref-for-data-stage">data stage</a> of
 the transfer.</p>
    <li data-md>
     <p>Let <var>result</var> be a new <code class="idl"><a data-link-type="idl" href="#usbouttransferresult" id="ref-for-usbouttransferresult②">USBOutTransferResult</a></code>.</p>
    <li data-md>
     <p>If the device responds by stalling the <a data-link-type="dfn" href="#default-endpoint" id="ref-for-default-endpoint②">default control pipe</a> set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbouttransferresult-status" id="ref-for-dom-usbouttransferresult-status">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-stall" id="ref-for-dom-usbtransferstatus-stall①">"stall"</a></code>.</p>
    <li data-md>
     <p>If the device acknowledges the transfer set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbouttransferresult-status" id="ref-for-dom-usbouttransferresult-status①">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-ok" id="ref-for-dom-usbtransferstatus-ok①">"ok"</a></code> and <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbouttransferresult-byteswritten" id="ref-for-dom-usbouttransferresult-byteswritten">bytesWritten</a></code></code> to <code><var>data</var>.length</code>.</p>
    <li data-md>
     <p>If the transfer fails for any other reason <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise②⑧">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#networkerror" id="ref-for-networkerror⑤">NetworkError</a></code> and abort these steps.</p>
    <li data-md>
     <p><a data-link-type="dfn">Resolve</a> <var>promise</var> with <var>result</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-clearhalt" id="ref-for-dom-usbdevice-clearhalt①">clearHalt(direction, endpointNumber)</a></code> method, when invoked,
MUST return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects①①">Promise</a></code> <var>promise</var> and run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel⑧">in
parallel</a>:</p>
   <ol>
    <li data-md>
     <p>If the device is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise②⑨">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror①③">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>Let <var>endpoint</var> be the endpoint in the <a data-link-type="dfn" href="#active-configuration" id="ref-for-active-configuration④">active configuration</a> with <code>bEndpointAddress</code> corresponding to <var>direction</var> and <var>endpointNumber</var>. If no such endpoint exists <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise③⓪">reject</a> <var>promise</var> and
 abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened①①">opened</a></code></code> or <code><var>interface</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed⑤">claimed</a></code></code> is not <code>true</code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise③①">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror⑥">InvalidStateError</a></code> and abort these
 steps.</p>
    <li data-md>
     <p>Issue a <code>ClearFeature(ENDPOINT_HALT)</code> <a data-link-type="dfn" href="#control-transfer" id="ref-for-control-transfer⑦">control transfer</a> to
 the device to clear the halt condition on <var>endpoint</var>.</p>
    <li data-md>
     <p>On failure <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise③②">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#networkerror" id="ref-for-networkerror⑥">NetworkError</a></code>, otherwise <a data-link-type="dfn">resolve</a> <var>promise</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-transferin" id="ref-for-dom-usbdevice-transferin①">transferIn(endpointNumber, length)</a></code> method, when invoked, MUST
return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects①②">Promise</a></code> <var>promise</var> and run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel⑨">in
parallel</a>:</p>
   <ol>
    <li data-md>
     <p>Let <var>device</var> be the target <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice①⑤">USBDevice</a></code> object.</p>
    <li data-md>
     <p>If <var>device</var> is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise③③">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror①④">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>Let <var>endpoint</var> be the IN endpoint in the <a data-link-type="dfn" href="#active-configuration" id="ref-for-active-configuration⑤">active configuration</a> with <code>bEndpointAddress</code> corresponding to <var>endpointNumber</var>. If there
 is no such endpoint <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise③④">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror①⑤">NotFoundError</a></code> and
 abort these steps.</p>
    <li data-md>
     <p>If <var>endpoint</var> is not a bulk or interrupt endpoint <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise③⑤">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidaccesserror" id="ref-for-invalidaccesserror">InvalidAccessError</a></code> and abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened①②">opened</a></code></code> or <code><var>interface</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed⑥">claimed</a></code></code> is not <code>true</code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise③⑥">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror⑦">InvalidStateError</a></code> and abort these
 steps.</p>
    <li data-md>
     <p>Let <var>buffer</var> be a host buffer with space for <var>length</var> bytes.</p>
    <li data-md>
     <p>As appropriate for <var>endpoint</var> enqueue a <a data-link-type="dfn" href="#bulk-transfers" id="ref-for-bulk-transfers">bulk</a> or <a data-link-type="dfn" href="#interrupt-transfers" id="ref-for-interrupt-transfers">interrupt</a> <a data-link-type="dfn" href="#in-transfers" id="ref-for-in-transfers">IN transfer</a> on <var>endpoint</var> to receive <var>length</var> bytes of data from the device into <var>buffer</var>.</p>
    <li data-md>
     <p>Let <var>bytesTransferred</var> be the number of bytes written to <var>buffer</var>.</p>
    <li data-md>
     <p>Let <var>result</var> be a new <code class="idl"><a data-link-type="idl" href="#usbintransferresult" id="ref-for-usbintransferresult③">USBInTransferResult</a></code>.</p>
    <li data-md>
     <p>If data was received from <var>device</var> create a new <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-ArrayBuffer" id="ref-for-idl-ArrayBuffer①">ArrayBuffer</a></code> containing
 the first <var>bytesTransferred</var> bytes of <var>buffer</var> and set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbintransferresult-data" id="ref-for-dom-usbintransferresult-data②">data</a></code></code> to a new <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView①">DataView</a></code> constructed over it.</p>
    <li data-md>
     <p>If <var>device</var> responded with more than <var>length</var> bytes of data set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbintransferresult-status" id="ref-for-dom-usbintransferresult-status③">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-babble" id="ref-for-dom-usbtransferstatus-babble①">"babble"</a></code>.</p>
    <li data-md>
     <p>If the transfer ended because <var>endpoint</var> is halted set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbintransferresult-status" id="ref-for-dom-usbintransferresult-status④">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-stall" id="ref-for-dom-usbtransferstatus-stall②">"stall"</a></code>.</p>
    <li data-md>
     <p>If <var>device</var> acknowledged the complete transfer set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbintransferresult-status" id="ref-for-dom-usbintransferresult-status⑤">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-ok" id="ref-for-dom-usbtransferstatus-ok②">"ok"</a></code>.</p>
    <li data-md>
     <p>If the transfer failed for any other reason <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise③⑦">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#networkerror" id="ref-for-networkerror⑦">NetworkError</a></code> and abort these steps.</p>
    <li data-md>
     <p><a data-link-type="dfn">Resolve</a> <var>promise</var> with <var>result</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-transferout" id="ref-for-dom-usbdevice-transferout">transferOut(endpointNumber, data)</a></code> method, when invoked, MUST
return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects①③">Promise</a></code> <var>promise</var> and run the following steps in
parallel:</p>
   <ol>
    <li data-md>
     <p>If the device is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise③⑧">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror①⑥">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>Let <var>endpoint</var> be the OUT endpoint in the <a data-link-type="dfn" href="#active-configuration" id="ref-for-active-configuration⑥">active configuration</a> with <code>bEndpointAddress</code> corresponding to <var>endpointNumber</var>. If there
 is no such endpoint <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise③⑨">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror①⑦">NotFoundError</a></code> and
 abort these steps.</p>
    <li data-md>
     <p>If <var>endpoint</var> is not a bulk or interrupt endpoint <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise④⓪">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidaccesserror" id="ref-for-invalidaccesserror①">InvalidAccessError</a></code> and abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened①③">opened</a></code></code> or <code><var>interface</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed⑦">claimed</a></code></code> is not <code>true</code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise④①">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror⑧">InvalidStateError</a></code> and abort these
 steps.</p>
    <li data-md>
     <p>As appropriate for <var>endpoint</var> enqueue a <a data-link-type="dfn" href="#bulk-transfers" id="ref-for-bulk-transfers①">bulk</a> or <a data-link-type="dfn" href="#interrupt-transfers" id="ref-for-interrupt-transfers①">interrupt</a> <a data-link-type="dfn" href="#out-transfers" id="ref-for-out-transfers">OUT transfer</a> on <var>endpoint</var> to transmit <var>data</var> to the device.</p>
    <li data-md>
     <p>Let <var>result</var> be a new <code class="idl"><a data-link-type="idl" href="#usbouttransferresult" id="ref-for-usbouttransferresult③">USBOutTransferResult</a></code>.</p>
    <li data-md>
     <p>Set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbouttransferresult-byteswritten" id="ref-for-dom-usbouttransferresult-byteswritten①">bytesWritten</a></code></code> to the
 amount of data successfully sent to the device.</p>
    <li data-md>
     <p>If the endpoint is stalled set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbouttransferresult-status" id="ref-for-dom-usbouttransferresult-status②">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-stall" id="ref-for-dom-usbtransferstatus-stall③">"stall"</a></code>.</p>
    <li data-md>
     <p>If the device acknowledges the complete transfer set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbouttransferresult-status" id="ref-for-dom-usbouttransferresult-status③">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-ok" id="ref-for-dom-usbtransferstatus-ok③">"ok"</a></code>.</p>
    <li data-md>
     <p>If the transfer fails for any other reason <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise④②">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#networkerror" id="ref-for-networkerror⑧">NetworkError</a></code> and abort these steps.</p>
    <li data-md>
     <p><a data-link-type="dfn">Resolve</a> <var>promise</var> with <var>result</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-isochronoustransferin" id="ref-for-dom-usbdevice-isochronoustransferin">isochronousTransferIn(endpointNumber, packetLengths)</a></code> method,
when invoked, MUST return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects①④">Promise</a></code> <var>promise</var> and run the following
steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel①⓪">in parallel</a>:</p>
   <ol>
    <li data-md>
     <p>If the device is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise④③">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror①⑧">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>Let <var>endpoint</var> be the IN endpoint in the <a data-link-type="dfn" href="#active-configuration" id="ref-for-active-configuration⑦">active configuration</a> with <code>bEndpointAddress</code> corresponding to <var>endpointNumber</var>. If there
 is no such endpoint <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise④④">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror①⑨">NotFoundError</a></code> and
 abort these steps.</p>
    <li data-md>
     <p>If <var>endpoint</var> is not an isochronous endpoint <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise④⑤">reject</a> <var>promise</var> with
 an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidaccesserror" id="ref-for-invalidaccesserror②">InvalidAccessError</a></code> and abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened①④">opened</a></code></code> or <code><var>interface</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed⑧">claimed</a></code></code> is not <code>true</code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise④⑥">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror⑨">InvalidStateError</a></code> and abort these
 steps.</p>
    <li data-md>
     <p>Let <var>length</var> be the sum of the elements of <var>packetLengths</var>.</p>
    <li data-md>
     <p>Let <var>buffer</var> be a new <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-ArrayBuffer" id="ref-for-idl-ArrayBuffer②">ArrayBuffer</a></code> of <var>length</var> bytes.</p>
    <li data-md>
     <p>Let <var>result</var> be a new <code class="idl"><a data-link-type="idl" href="#usbisochronousintransferresult" id="ref-for-usbisochronousintransferresult①">USBIsochronousInTransferResult</a></code> and set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbisochronousintransferresult-data" id="ref-for-dom-usbisochronousintransferresult-data">data</a></code></code> to a new <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView②">DataView</a></code> constructed over <var>buffer</var>.</p>
    <li data-md>
     <p>Enqueue an <a data-link-type="dfn" href="#isochronous-transfers" id="ref-for-isochronous-transfers">isochronous IN transfer</a> on <var>endpoint</var> that will write up to <var>length</var> bytes of data from the device
 into <var>buffer</var>.</p>
    <li data-md>
     <p>For each packet <var>i</var> from <code>0</code> to <code><var>packetLengths</var>.length -
 1</code>:</p>
     <ol>
      <li data-md>
       <p>Let <var>packet</var> be a new <code class="idl"><a data-link-type="idl" href="#usbisochronousintransferpacket" id="ref-for-usbisochronousintransferpacket">USBIsochronousInTransferPacket</a></code> and set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbisochronousintransferresult-packets" id="ref-for-dom-usbisochronousintransferresult-packets">packets</a></code>[i]</code> to <var>packet</var>.</p>
      <li data-md>
       <p>Let <var>view</var> be a new <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView③">DataView</a></code> over the portion of <var>buffer</var> containing the data received from the device for this packet and set <code><var>packet</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbisochronousintransferpacket-data" id="ref-for-dom-usbisochronousintransferpacket-data">data</a></code></code> to <var>view</var>.</p>
      <li data-md>
       <p>If the device responds with more than <code><var>packetLengths</var>[i]</code> bytes of data set <code><var>packet</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbisochronousintransferpacket-status" id="ref-for-dom-usbisochronousintransferpacket-status">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-babble" id="ref-for-dom-usbtransferstatus-babble②">"babble"</a></code>.</p>
      <li data-md>
       <p>If the transfer ends because <var>endpoint</var> is stalled set <code><var>packet</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbisochronousintransferpacket-status" id="ref-for-dom-usbisochronousintransferpacket-status①">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-stall" id="ref-for-dom-usbtransferstatus-stall④">"stall"</a></code>.</p>
      <li data-md>
       <p>If the device acknowledges the complete transfer set <code><var>packet</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbisochronousintransferpacket-status" id="ref-for-dom-usbisochronousintransferpacket-status②">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-ok" id="ref-for-dom-usbtransferstatus-ok④">"ok"</a></code>.</p>
      <li data-md>
       <p>If the transfer fails for any other reason <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise④⑦">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#networkerror" id="ref-for-networkerror⑨">NetworkError</a></code> and abort these steps.</p>
     </ol>
    <li data-md>
     <p><a data-link-type="dfn">Resolve</a> <var>promise</var> with <var>result</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-isochronoustransferout" id="ref-for-dom-usbdevice-isochronoustransferout">isochronousTransferOut(endpointNumber, data, packetLengths)</a></code> method, when invoked, MUST return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects①⑤">Promise</a></code> <var>promise</var> and run the
following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel①①">in parallel</a>:</p>
   <ol>
    <li data-md>
     <p>If the device is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise④⑧">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror②⓪">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>Let <var>endpoint</var> be the OUT endpoint in the <a data-link-type="dfn" href="#active-configuration" id="ref-for-active-configuration⑧">active configuration</a> with <code>bEndpointAddress</code> corresponding to <var>endpointNumber</var>. If there
 is no such endpoint <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise④⑨">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror②①">NotFoundError</a></code> and
 abort these steps.</p>
    <li data-md>
     <p>If <var>endpoint</var> is not an isochronous endpoint <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑤⓪">reject</a> <var>promise</var> with
 an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidaccesserror" id="ref-for-invalidaccesserror③">InvalidAccessError</a></code> and abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened①⑤">opened</a></code></code> or <code><var>interface</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed⑨">claimed</a></code></code> is not <code>true</code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑤①">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①⓪">InvalidStateError</a></code> and abort these
 steps.</p>
    <li data-md>
     <p>Let <var>length</var> be the sum of the elements of <var>packetLengths</var>.</p>
    <li data-md>
     <p>Let <var>result</var> be a new <code class="idl"><a data-link-type="idl" href="#usbisochronousouttransferresult" id="ref-for-usbisochronousouttransferresult①">USBIsochronousOutTransferResult</a></code>.</p>
    <li data-md>
     <p>Enqueue an <a data-link-type="dfn" href="#isochronous-transfers" id="ref-for-isochronous-transfers①">isochronous OUT transfer</a> on <var>endpoint</var> that will write <var>buffer</var> to the device, divided into <code><var>packetLength</var>.length</code> packets of <code><var>packetLength</var>[i]</code> bytes (for packets <var>i</var> from <code>0</code> to <code><var>packetLengths</var>.length - 1</code>).</p>
    <li data-md>
     <p>For each packet <var>i</var> from <code>0</code> to <code><var>packetLengths</var>.length -
 1</code> the host attempts to send to the device:</p>
     <ol>
      <li data-md>
       <p>Let <var>packet</var> be a new <code class="idl"><a data-link-type="idl" href="#usbisochronousouttransferpacket" id="ref-for-usbisochronousouttransferpacket">USBIsochronousOutTransferPacket</a></code> and set <code><var>result</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbisochronousouttransferresult-packets" id="ref-for-dom-usbisochronousouttransferresult-packets">packets</a></code>[i]</code> to <var>packet</var>.</p>
      <li data-md>
       <p>Let <code><var>packet</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbisochronousouttransferpacket-byteswritten" id="ref-for-dom-usbisochronousouttransferpacket-byteswritten">bytesWritten</a></code></code> be the amount of data successfully sent to the device as part of this
  packet.</p>
      <li data-md>
       <p>If the transfer ends because <var>endpoint</var> is stalled set <code><var>packet</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbisochronousouttransferpacket-status" id="ref-for-dom-usbisochronousouttransferpacket-status">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-stall" id="ref-for-dom-usbtransferstatus-stall⑤">"stall"</a></code>.</p>
      <li data-md>
       <p>If the device acknowledges the complete transfer set <code><var>packet</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbisochronousouttransferpacket-status" id="ref-for-dom-usbisochronousouttransferpacket-status①">status</a></code></code> to <code class="idl"><a data-link-type="idl" href="#dom-usbtransferstatus-ok" id="ref-for-dom-usbtransferstatus-ok⑤">"ok"</a></code>.</p>
      <li data-md>
       <p>If the transfer fails for any other reason <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑤②">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#networkerror" id="ref-for-networkerror①⓪">NetworkError</a></code> and abort these steps.</p>
     </ol>
    <li data-md>
     <p><a data-link-type="dfn">Resolve</a> <var>promise</var> with <var>result</var>.</p>
   </ol>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-reset" id="ref-for-dom-usbdevice-reset">reset()</a></code> method, when invoked, MUST return a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-promise-objects" id="ref-for-sec-promise-objects①⑥">Promise</a></code> <var>promise</var> and run the following steps <a data-link-type="dfn" href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel" id="ref-for-in-parallel①②">in parallel</a>:</p>
   <ol>
    <li data-md>
     <p>Let <var>device</var> be the target <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice①⑥">USBDevice</a></code> object.</p>
    <li data-md>
     <p>If <var>device</var> is no longer connected to the system, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑤③">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror②②">NotFoundError</a></code> and abort these steps.</p>
    <li data-md>
     <p>If <code><var>device</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbdevice-opened" id="ref-for-dom-usbdevice-opened①⑥">opened</a></code></code> is not equal to <code>true</code> <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑤④">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①①">InvalidStateError</a></code> and
 abort these steps.</p>
    <li data-md>
     <p>Abort all operations on the device and <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑤⑤">reject</a> their associated
 promises with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#aborterror" id="ref-for-aborterror③">AbortError</a></code>.</p>
    <li data-md>
     <p>Perform the necessary platform-specific operation to soft reset the device.</p>
    <li data-md>
     <p>On failure <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑤⑥">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#networkerror" id="ref-for-networkerror①①">NetworkError</a></code>, otherwise <a data-link-type="dfn">resolve</a> <var>promise</var>.</p>
   </ol>
   <p class="issue" id="issue-0de671a3"><a class="self-link" href="#issue-0de671a3"></a> What configuration is the device in after it resets? <a href="https://github.com/WICG/webusb/issues/36">&lt;https://github.com/WICG/webusb/issues/36></a></p>
   <h3 class="heading settled" data-level="6.1" id="transfers"><span class="secno">6.1. </span><span class="content">Transfers</span><a class="self-link" href="#transfers"></a></h3>
<pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-usbrequesttype"><code><c- g>USBRequestType</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBRequestType" data-dfn-type="enum-value" data-export id="dom-usbrequesttype-standard"><code><c- s>"standard"</c-></code><a class="self-link" href="#dom-usbrequesttype-standard"></a></dfn>,
  <dfn class="idl-code" data-dfn-for="USBRequestType" data-dfn-type="enum-value" data-export id="dom-usbrequesttype-class"><code><c- s>"class"</c-></code><a class="self-link" href="#dom-usbrequesttype-class"></a></dfn>,
  <dfn class="dfn-paneled idl-code" data-dfn-for="USBRequestType" data-dfn-type="enum-value" data-export id="dom-usbrequesttype-vendor"><code><c- s>"vendor"</c-></code></dfn>
};

<c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-usbrecipient"><code><c- g>USBRecipient</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBRecipient" data-dfn-type="enum-value" data-export id="dom-usbrecipient-device"><code><c- s>"device"</c-></code><a class="self-link" href="#dom-usbrecipient-device"></a></dfn>,
  <dfn class="dfn-paneled idl-code" data-dfn-for="USBRecipient" data-dfn-type="enum-value" data-export id="dom-usbrecipient-interface"><code><c- s>"interface"</c-></code></dfn>,
  <dfn class="dfn-paneled idl-code" data-dfn-for="USBRecipient" data-dfn-type="enum-value" data-export id="dom-usbrecipient-endpoint"><code><c- s>"endpoint"</c-></code></dfn>,
  <dfn class="idl-code" data-dfn-for="USBRecipient" data-dfn-type="enum-value" data-export id="dom-usbrecipient-other"><code><c- s>"other"</c-></code><a class="self-link" href="#dom-usbrecipient-other"></a></dfn>
};

<c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-usbtransferstatus"><code><c- g>USBTransferStatus</c-></code></dfn> {
  <dfn class="dfn-paneled idl-code" data-dfn-for="USBTransferStatus" data-dfn-type="enum-value" data-export id="dom-usbtransferstatus-ok"><code><c- s>"ok"</c-></code></dfn>,
  <dfn class="dfn-paneled idl-code" data-dfn-for="USBTransferStatus" data-dfn-type="enum-value" data-export id="dom-usbtransferstatus-stall"><code><c- s>"stall"</c-></code></dfn>,
  <dfn class="dfn-paneled idl-code" data-dfn-for="USBTransferStatus" data-dfn-type="enum-value" data-export id="dom-usbtransferstatus-babble"><code><c- s>"babble"</c-></code></dfn>
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-usbcontroltransferparameters"><code><c- g>USBControlTransferParameters</c-></code></dfn> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbrequesttype" id="ref-for-enumdef-usbrequesttype"><c- n>USBRequestType</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBControlTransferParameters" data-dfn-type="dict-member" data-export data-type="USBRequestType " id="dom-usbcontroltransferparameters-requesttype"><code><c- g>requestType</c-></code></dfn>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbrecipient" id="ref-for-enumdef-usbrecipient"><c- n>USBRecipient</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBControlTransferParameters" data-dfn-type="dict-member" data-export data-type="USBRecipient " id="dom-usbcontroltransferparameters-recipient"><code><c- g>recipient</c-></code></dfn>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②②"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBControlTransferParameters" data-dfn-type="dict-member" data-export data-type="octet " id="dom-usbcontroltransferparameters-request"><code><c- g>request</c-></code></dfn>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short⑤"><c- b>unsigned</c-> <c- b>short</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBControlTransferParameters" data-dfn-type="dict-member" data-export data-type="unsigned short " id="dom-usbcontroltransferparameters-value"><code><c- g>value</c-></code></dfn>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short⑥"><c- b>unsigned</c-> <c- b>short</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBControlTransferParameters" data-dfn-type="dict-member" data-export data-type="unsigned short " id="dom-usbcontroltransferparameters-index"><code><c- g>index</c-></code></dfn>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑥"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑤"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbintransferresult"><code><c- g>USBInTransferResult</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBInTransferResult" data-dfn-type="constructor" data-export data-lt="USBInTransferResult(status, data)|constructor(status, data)|USBInTransferResult(status)|constructor(status)" id="dom-usbintransferresult-usbintransferresult"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-usbintransferresult-usbintransferresult"></a></dfn>(<a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus"><c- n>USBTransferStatus</c-></a> <dfn class="idl-code" data-dfn-for="USBInTransferResult/USBInTransferResult(status, data), USBInTransferResult/constructor(status, data), USBInTransferResult/USBInTransferResult(status), USBInTransferResult/constructor(status)" data-dfn-type="argument" data-export id="dom-usbintransferresult-usbintransferresult-status-data-status"><code><c- g>status</c-></code><a class="self-link" href="#dom-usbintransferresult-usbintransferresult-status-data-status"></a></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView④"><c- b>DataView</c-></a>? <dfn class="idl-code" data-dfn-for="USBInTransferResult/USBInTransferResult(status, data), USBInTransferResult/constructor(status, data), USBInTransferResult/USBInTransferResult(status), USBInTransferResult/constructor(status)" data-dfn-type="argument" data-export id="dom-usbintransferresult-usbintransferresult-status-data-data"><code><c- g>data</c-></code><a class="self-link" href="#dom-usbintransferresult-usbintransferresult-status-data-data"></a></dfn>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView⑤"><c- b>DataView</c-></a>? <dfn class="dfn-paneled idl-code" data-dfn-for="USBInTransferResult" data-dfn-type="attribute" data-export data-readonly data-type="DataView?" id="dom-usbintransferresult-data"><code><c- g>data</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus①"><c- n>USBTransferStatus</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBInTransferResult" data-dfn-type="attribute" data-export data-readonly data-type="USBTransferStatus" id="dom-usbintransferresult-status"><code><c- g>status</c-></code></dfn>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑦"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑥"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbouttransferresult"><code><c- g>USBOutTransferResult</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBOutTransferResult" data-dfn-type="constructor" data-export data-lt="USBOutTransferResult(status, bytesWritten)|constructor(status, bytesWritten)|USBOutTransferResult(status)|constructor(status)" id="dom-usbouttransferresult-usbouttransferresult"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-usbouttransferresult-usbouttransferresult"></a></dfn>(<a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus②"><c- n>USBTransferStatus</c-></a> <dfn class="idl-code" data-dfn-for="USBOutTransferResult/USBOutTransferResult(status, bytesWritten), USBOutTransferResult/constructor(status, bytesWritten), USBOutTransferResult/USBOutTransferResult(status), USBOutTransferResult/constructor(status)" data-dfn-type="argument" data-export id="dom-usbouttransferresult-usbouttransferresult-status-byteswritten-status"><code><c- g>status</c-></code><a class="self-link" href="#dom-usbouttransferresult-usbouttransferresult-status-byteswritten-status"></a></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long③"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="idl-code" data-dfn-for="USBOutTransferResult/USBOutTransferResult(status, bytesWritten), USBOutTransferResult/constructor(status, bytesWritten), USBOutTransferResult/USBOutTransferResult(status), USBOutTransferResult/constructor(status)" data-dfn-type="argument" data-export id="dom-usbouttransferresult-usbouttransferresult-status-byteswritten-byteswritten"><code><c- g>bytesWritten</c-></code><a class="self-link" href="#dom-usbouttransferresult-usbouttransferresult-status-byteswritten-byteswritten"></a></dfn> = 0);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long④"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBOutTransferResult" data-dfn-type="attribute" data-export data-readonly data-type="unsigned long" id="dom-usbouttransferresult-byteswritten"><code><c- g>bytesWritten</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus③"><c- n>USBTransferStatus</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBOutTransferResult" data-dfn-type="attribute" data-export data-readonly data-type="USBTransferStatus" id="dom-usbouttransferresult-status"><code><c- g>status</c-></code></dfn>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑧"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑦"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbisochronousintransferpacket"><code><c- g>USBIsochronousInTransferPacket</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBIsochronousInTransferPacket" data-dfn-type="constructor" data-export data-lt="USBIsochronousInTransferPacket(status, data)|constructor(status, data)|USBIsochronousInTransferPacket(status)|constructor(status)" id="dom-usbisochronousintransferpacket-usbisochronousintransferpacket"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-usbisochronousintransferpacket-usbisochronousintransferpacket"></a></dfn>(<a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus④"><c- n>USBTransferStatus</c-></a> <dfn class="idl-code" data-dfn-for="USBIsochronousInTransferPacket/USBIsochronousInTransferPacket(status, data), USBIsochronousInTransferPacket/constructor(status, data), USBIsochronousInTransferPacket/USBIsochronousInTransferPacket(status), USBIsochronousInTransferPacket/constructor(status)" data-dfn-type="argument" data-export id="dom-usbisochronousintransferpacket-usbisochronousintransferpacket-status-data-status"><code><c- g>status</c-></code><a class="self-link" href="#dom-usbisochronousintransferpacket-usbisochronousintransferpacket-status-data-status"></a></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView⑥"><c- b>DataView</c-></a>? <dfn class="idl-code" data-dfn-for="USBIsochronousInTransferPacket/USBIsochronousInTransferPacket(status, data), USBIsochronousInTransferPacket/constructor(status, data), USBIsochronousInTransferPacket/USBIsochronousInTransferPacket(status), USBIsochronousInTransferPacket/constructor(status)" data-dfn-type="argument" data-export id="dom-usbisochronousintransferpacket-usbisochronousintransferpacket-status-data-data"><code><c- g>data</c-></code><a class="self-link" href="#dom-usbisochronousintransferpacket-usbisochronousintransferpacket-status-data-data"></a></dfn>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView⑦"><c- b>DataView</c-></a>? <dfn class="dfn-paneled idl-code" data-dfn-for="USBIsochronousInTransferPacket" data-dfn-type="attribute" data-export data-readonly data-type="DataView?" id="dom-usbisochronousintransferpacket-data"><code><c- g>data</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus⑤"><c- n>USBTransferStatus</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBIsochronousInTransferPacket" data-dfn-type="attribute" data-export data-readonly data-type="USBTransferStatus" id="dom-usbisochronousintransferpacket-status"><code><c- g>status</c-></code></dfn>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑨"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑧"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbisochronousintransferresult"><code><c- g>USBIsochronousInTransferResult</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBIsochronousInTransferResult" data-dfn-type="constructor" data-export data-lt="USBIsochronousInTransferResult(packets, data)|constructor(packets, data)|USBIsochronousInTransferResult(packets)|constructor(packets)" id="dom-usbisochronousintransferresult-usbisochronousintransferresult"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-usbisochronousintransferresult-usbisochronousintransferresult"></a></dfn>(<c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#usbisochronousintransferpacket" id="ref-for-usbisochronousintransferpacket①"><c- n>USBIsochronousInTransferPacket</c-></a>> <dfn class="idl-code" data-dfn-for="USBIsochronousInTransferResult/USBIsochronousInTransferResult(packets, data), USBIsochronousInTransferResult/constructor(packets, data), USBIsochronousInTransferResult/USBIsochronousInTransferResult(packets), USBIsochronousInTransferResult/constructor(packets)" data-dfn-type="argument" data-export id="dom-usbisochronousintransferresult-usbisochronousintransferresult-packets-data-packets"><code><c- g>packets</c-></code><a class="self-link" href="#dom-usbisochronousintransferresult-usbisochronousintransferresult-packets-data-packets"></a></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView⑧"><c- b>DataView</c-></a>? <dfn class="idl-code" data-dfn-for="USBIsochronousInTransferResult/USBIsochronousInTransferResult(packets, data), USBIsochronousInTransferResult/constructor(packets, data), USBIsochronousInTransferResult/USBIsochronousInTransferResult(packets), USBIsochronousInTransferResult/constructor(packets)" data-dfn-type="argument" data-export id="dom-usbisochronousintransferresult-usbisochronousintransferresult-packets-data-data"><code><c- g>data</c-></code><a class="self-link" href="#dom-usbisochronousintransferresult-usbisochronousintransferresult-packets-data-data"></a></dfn>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView⑨"><c- b>DataView</c-></a>? <dfn class="dfn-paneled idl-code" data-dfn-for="USBIsochronousInTransferResult" data-dfn-type="attribute" data-export data-readonly data-type="DataView?" id="dom-usbisochronousintransferresult-data"><code><c- g>data</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbisochronousintransferpacket" id="ref-for-usbisochronousintransferpacket②"><c- n>USBIsochronousInTransferPacket</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBIsochronousInTransferResult" data-dfn-type="attribute" data-export data-readonly data-type="FrozenArray<USBIsochronousInTransferPacket>" id="dom-usbisochronousintransferresult-packets"><code><c- g>packets</c-></code></dfn>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⓪"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑨"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbisochronousouttransferpacket"><code><c- g>USBIsochronousOutTransferPacket</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBIsochronousOutTransferPacket" data-dfn-type="constructor" data-export data-lt="USBIsochronousOutTransferPacket(status, bytesWritten)|constructor(status, bytesWritten)|USBIsochronousOutTransferPacket(status)|constructor(status)" id="dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket"></a></dfn>(<a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus⑥"><c- n>USBTransferStatus</c-></a> <dfn class="idl-code" data-dfn-for="USBIsochronousOutTransferPacket/USBIsochronousOutTransferPacket(status, bytesWritten), USBIsochronousOutTransferPacket/constructor(status, bytesWritten), USBIsochronousOutTransferPacket/USBIsochronousOutTransferPacket(status), USBIsochronousOutTransferPacket/constructor(status)" data-dfn-type="argument" data-export id="dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket-status-byteswritten-status"><code><c- g>status</c-></code><a class="self-link" href="#dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket-status-byteswritten-status"></a></dfn>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑤"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="idl-code" data-dfn-for="USBIsochronousOutTransferPacket/USBIsochronousOutTransferPacket(status, bytesWritten), USBIsochronousOutTransferPacket/constructor(status, bytesWritten), USBIsochronousOutTransferPacket/USBIsochronousOutTransferPacket(status), USBIsochronousOutTransferPacket/constructor(status)" data-dfn-type="argument" data-export id="dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket-status-byteswritten-byteswritten"><code><c- g>bytesWritten</c-></code><a class="self-link" href="#dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket-status-byteswritten-byteswritten"></a></dfn> = 0);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑥"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBIsochronousOutTransferPacket" data-dfn-type="attribute" data-export data-readonly data-type="unsigned long" id="dom-usbisochronousouttransferpacket-byteswritten"><code><c- g>bytesWritten</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus⑦"><c- n>USBTransferStatus</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBIsochronousOutTransferPacket" data-dfn-type="attribute" data-export data-readonly data-type="USBTransferStatus" id="dom-usbisochronousouttransferpacket-status"><code><c- g>status</c-></code></dfn>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⓪"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbisochronousouttransferresult"><code><c- g>USBIsochronousOutTransferResult</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBIsochronousOutTransferResult" data-dfn-type="constructor" data-export data-lt="USBIsochronousOutTransferResult(packets)|constructor(packets)" id="dom-usbisochronousouttransferresult-usbisochronousouttransferresult"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-usbisochronousouttransferresult-usbisochronousouttransferresult"></a></dfn>(<c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#usbisochronousouttransferpacket" id="ref-for-usbisochronousouttransferpacket①"><c- n>USBIsochronousOutTransferPacket</c-></a>> <dfn class="idl-code" data-dfn-for="USBIsochronousOutTransferResult/USBIsochronousOutTransferResult(packets), USBIsochronousOutTransferResult/constructor(packets)" data-dfn-type="argument" data-export id="dom-usbisochronousouttransferresult-usbisochronousouttransferresult-packets-packets"><code><c- g>packets</c-></code><a class="self-link" href="#dom-usbisochronousouttransferresult-usbisochronousouttransferresult-packets-packets"></a></dfn>);
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbisochronousouttransferpacket" id="ref-for-usbisochronousouttransferpacket②"><c- n>USBIsochronousOutTransferPacket</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBIsochronousOutTransferResult" data-dfn-type="attribute" data-export data-readonly data-type="FrozenArray<USBIsochronousOutTransferPacket>" id="dom-usbisochronousouttransferresult-packets"><code><c- g>packets</c-></code></dfn>;
};
</pre>
   <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="control-transfer">control transfer</dfn> is a special class of USB traffic most commonly
used for configuring a device. It consists of three stages: <a data-link-type="dfn" href="#setup-stage" id="ref-for-setup-stage">setup</a>, <a data-link-type="dfn" href="#data-stage" id="ref-for-data-stage①">data</a> and <a data-link-type="dfn" href="#status-stage" id="ref-for-status-stage">status</a>. In the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="setup-stage">setup stage</dfn> a <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="setup-packet">setup packet</dfn> is transmitted to the device containing request
parameters including the transfer direction and size of the data to follow. In
the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="data-stage">data stage</dfn> that data is either sent to or received from the
device. In the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="status-stage">status stage</dfn> successful handling of the request is
acknowledged or a failure is signaled.</p>
   <p>All USB devices MUST have a <a data-link-type="dfn" href="#default-endpoint" id="ref-for-default-endpoint③">default control pipe</a> which is <var>endpointNumber</var> <code>0</code>.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbcontroltransferparameters-requesttype" id="ref-for-dom-usbcontroltransferparameters-requesttype①">requestType</a></code> attribute populates part of
the <code>bmRequestType</code> field of the <a data-link-type="dfn" href="#setup-packet" id="ref-for-setup-packet①">setup packet</a> to indicate
whether this request is part of the USB standard, a particular USB device class
specification or a vendor-specific protocol.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbcontroltransferparameters-recipient" id="ref-for-dom-usbcontroltransferparameters-recipient①">recipient</a></code> attribute populates part of the <code>bmRequestType</code> field of the <a data-link-type="dfn" href="#setup-packet" id="ref-for-setup-packet②">setup packet</a> to indicate whether
the <a data-link-type="dfn" href="#control-transfer" id="ref-for-control-transfer⑧">control transfer</a> is addressed to the entire device, or a specific
interface or endpoint.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbcontroltransferparameters-request" id="ref-for-dom-usbcontroltransferparameters-request①">request</a></code> attribute populates the <code>bRequest</code> field of the <a data-link-type="dfn" href="#setup-packet" id="ref-for-setup-packet③">setup packet</a>. Valid requests are
defined by the USB standard, USB device class specifications or the device
vendor.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbcontroltransferparameters-value" id="ref-for-dom-usbcontroltransferparameters-value①">value</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-usbcontroltransferparameters-index" id="ref-for-dom-usbcontroltransferparameters-index①">index</a></code> attributes populate the <code>wValue</code> and <code>wIndex</code> fields of the <a data-link-type="dfn" href="#setup-packet" id="ref-for-setup-packet④">setup packet</a> respectively. The meaning of these fields depends on the request being made.</p>
   <p>To <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="check-the-validity-of-the-control-transfer-parameters">check the validity of the control transfer parameters</dfn> perform the following steps:</p>
   <ol>
    <li data-md>
     <p>Let <var>setup</var> be the <code class="idl"><a data-link-type="idl" href="#dictdef-usbcontroltransferparameters" id="ref-for-dictdef-usbcontroltransferparameters②">USBControlTransferParameters</a></code> created for the
 transfer.</p>
    <li data-md>
     <p>Let <var>promise</var> be the promise created for the transfer.</p>
    <li data-md>
     <p>Let <var>configuration</var> be the <a data-link-type="dfn" href="#active-configuration" id="ref-for-active-configuration⑨">active configuration</a>. If the device is
 not configured abort these steps.</p>
    <li data-md>
     <p>If <code><var>setup</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbcontroltransferparameters-recipient" id="ref-for-dom-usbcontroltransferparameters-recipient②">recipient</a></code></code> is <code class="idl"><a data-link-type="idl" href="#dom-usbrecipient-interface" id="ref-for-dom-usbrecipient-interface①">"interface"</a></code>, perform the following steps:</p>
     <ol>
      <li data-md>
       <p>Let <var>interfaceNumber</var> be the lower 8 bits of <code><var>setup</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbcontroltransferparameters-index" id="ref-for-dom-usbcontroltransferparameters-index②">index</a></code></code>.</p>
      <li data-md>
       <p>Let <var>interface</var> be the interface in the | configuration| with <code>bInterfaceNumber</code> equal to <var>interfaceNumber</var>. If no such
  interface exists, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑤⑦">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror②③">NotFoundError</a></code> and
  abort these steps.</p>
      <li data-md>
       <p>If <code><var>interface</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed①⓪">claimed</a></code></code> is not equal to <code>true</code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑤⑧">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①②">InvalidStateError</a></code> and abort these steps.</p>
     </ol>
    <li data-md>
     <p>If <code><var>setup</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbcontroltransferparameters-recipient" id="ref-for-dom-usbcontroltransferparameters-recipient③">recipient</a></code></code> is <code class="idl"><a data-link-type="idl" href="#dom-usbrecipient-endpoint" id="ref-for-dom-usbrecipient-endpoint">"endpoint"</a></code>, run the following steps:</p>
     <ol>
      <li data-md>
       <p>Let <var>endpointNumber</var> be defined as the lower 4 bits of <code><var>setup</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbcontroltransferparameters-index" id="ref-for-dom-usbcontroltransferparameters-index③">index</a></code></code>.</p>
      <li data-md>
       <p>Let <var>direction</var> be defined as <code class="idl"><a data-link-type="idl" href="#dom-usbdirection-in" id="ref-for-dom-usbdirection-in">"in"</a></code> if the 8th bit of <code><var>setup</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbcontroltransferparameters-index" id="ref-for-dom-usbcontroltransferparameters-index④">index</a></code></code> is <code>1</code> and <code class="idl"><a data-link-type="idl" href="#dom-usbdirection-out" id="ref-for-dom-usbdirection-out">"out"</a></code> otherwise.</p>
      <li data-md>
       <p>Let <var>endpoint</var> be the endpoint in the <a data-link-type="dfn" href="#active-configuration" id="ref-for-active-configuration①⓪">active configuration</a> with <code>bEndpointAddress</code> corresponding to <var>direction</var> and <var>endpointNumber</var>. If no such endpoint exists, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑤⑨">reject</a> <var>promise</var> with a <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#notfounderror" id="ref-for-notfounderror②④">NotFoundError</a></code> and abort these steps.</p>
      <li data-md>
       <p>Let <var>interface</var> be the interface in which <var>endpoint</var> is defined. If <code><var>interface</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed①①">claimed</a></code></code> is not equal to <code>true</code>, <a data-link-type="dfn" href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise" id="ref-for-reject-promise⑥⓪">reject</a> <var>promise</var> with an <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#invalidstateerror" id="ref-for-invalidstateerror①③">InvalidStateError</a></code>.</p>
     </ol>
   </ol>
   <h3 class="heading settled" data-level="6.2" id="configurations"><span class="secno">6.2. </span><span class="content">Configurations</span><a class="self-link" href="#configurations"></a></h3>
<pre class="idl highlight def">[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①②"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①①"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbconfiguration"><code><c- g>USBConfiguration</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBConfiguration" data-dfn-type="constructor" data-export data-lt="USBConfiguration(device, configurationValue)|constructor(device, configurationValue)" id="dom-usbconfiguration-usbconfiguration"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-usbconfiguration-usbconfiguration"></a></dfn>(<a class="n" data-link-type="idl-name" href="#usbdevice" id="ref-for-usbdevice①⑦"><c- n>USBDevice</c-></a> <dfn class="idl-code" data-dfn-for="USBConfiguration/USBConfiguration(device, configurationValue), USBConfiguration/constructor(device, configurationValue)" data-dfn-type="argument" data-export id="dom-usbconfiguration-usbconfiguration-device-configurationvalue-device"><code><c- g>device</c-></code><a class="self-link" href="#dom-usbconfiguration-usbconfiguration-device-configurationvalue-device"></a></dfn>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②③"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBConfiguration/USBConfiguration(device, configurationValue), USBConfiguration/constructor(device, configurationValue)" data-dfn-type="argument" data-export id="dom-usbconfiguration-usbconfiguration-device-configurationvalue-configurationvalue"><code><c- g>configurationValue</c-></code><a class="self-link" href="#dom-usbconfiguration-usbconfiguration-device-configurationvalue-configurationvalue"></a></dfn>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②④"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBConfiguration" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbconfiguration-configurationvalue"><code><c- g>configurationValue</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑤"><c- b>DOMString</c-></a>? <dfn class="dfn-paneled idl-code" data-dfn-for="USBConfiguration" data-dfn-type="attribute" data-export data-readonly data-type="DOMString?" id="dom-usbconfiguration-configurationname"><code><c- g>configurationName</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbinterface" id="ref-for-usbinterface"><c- n>USBInterface</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBConfiguration" data-dfn-type="attribute" data-export data-readonly data-type="FrozenArray<USBInterface>" id="dom-usbconfiguration-interfaces"><code><c- g>interfaces</c-></code></dfn>;
};
</pre>
   <p>Each device configuration SHALL have a unique <code class="idl"><a data-link-type="idl" href="#dom-usbconfiguration-configurationvalue" id="ref-for-dom-usbconfiguration-configurationvalue">configurationValue</a></code> that matches the <code>bConfigurationValue</code> fields of the <a data-link-type="dfn" href="#configuration-descriptor" id="ref-for-configuration-descriptor">configuration descriptor</a> that defines it.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbconfiguration-configurationname" id="ref-for-dom-usbconfiguration-configurationname">configurationName</a></code> attribute SHOULD contain the value
of the <a data-link-type="dfn" href="#string-descriptor" id="ref-for-string-descriptor②">string descriptor</a> referenced by the <code>iConfiguration</code> field of the <a data-link-type="dfn" href="#configuration-descriptor" id="ref-for-configuration-descriptor①">configuration descriptor</a>, if defined.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbconfiguration-interfaces" id="ref-for-dom-usbconfiguration-interfaces">interfaces</a></code> attribute SHALL contain a list of
interfaces exposed by this device configuration. These interfaces SHALL by
populated by collecting the <a data-link-type="dfn" href="#interface-descriptor" id="ref-for-interface-descriptor②">interface descriptors</a> contained within this <a data-link-type="dfn" href="#configuration-descriptor" id="ref-for-configuration-descriptor②">configuration descriptor</a> and organizing them by <code>bInterfaceNumber</code>.</p>
   <p class="issue" id="issue-7197531b"><a class="self-link" href="#issue-7197531b"></a> Include some non-normative information about device configurations. <a href="https://github.com/WICG/webusb/issues/46">&lt;https://github.com/WICG/webusb/issues/46></a></p>
   <h3 class="heading settled" data-level="6.3" id="interfaces"><span class="secno">6.3. </span><span class="content">Interfaces</span><a class="self-link" href="#interfaces"></a></h3>
<pre class="idl highlight def">[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①③"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①②"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbinterface"><code><c- g>USBInterface</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBInterface" data-dfn-type="constructor" data-export data-lt="USBInterface(configuration, interfaceNumber)|constructor(configuration, interfaceNumber)" id="dom-usbinterface-usbinterface"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-usbinterface-usbinterface"></a></dfn>(<a class="n" data-link-type="idl-name" href="#usbconfiguration" id="ref-for-usbconfiguration②"><c- n>USBConfiguration</c-></a> <dfn class="idl-code" data-dfn-for="USBInterface/USBInterface(configuration, interfaceNumber), USBInterface/constructor(configuration, interfaceNumber)" data-dfn-type="argument" data-export id="dom-usbinterface-usbinterface-configuration-interfacenumber-configuration"><code><c- g>configuration</c-></code><a class="self-link" href="#dom-usbinterface-usbinterface-configuration-interfacenumber-configuration"></a></dfn>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②⑤"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBInterface/USBInterface(configuration, interfaceNumber), USBInterface/constructor(configuration, interfaceNumber)" data-dfn-type="argument" data-export id="dom-usbinterface-usbinterface-configuration-interfacenumber-interfacenumber"><code><c- g>interfaceNumber</c-></code><a class="self-link" href="#dom-usbinterface-usbinterface-configuration-interfacenumber-interfacenumber"></a></dfn>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②⑥"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBInterface" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbinterface-interfacenumber"><code><c- g>interfaceNumber</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#usbalternateinterface" id="ref-for-usbalternateinterface"><c- n>USBAlternateInterface</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBInterface" data-dfn-type="attribute" data-export data-readonly data-type="USBAlternateInterface" id="dom-usbinterface-alternate"><code><c- g>alternate</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbalternateinterface" id="ref-for-usbalternateinterface①"><c- n>USBAlternateInterface</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBInterface" data-dfn-type="attribute" data-export data-readonly data-type="FrozenArray<USBAlternateInterface>" id="dom-usbinterface-alternates"><code><c- g>alternates</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean①"><c- b>boolean</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBInterface" data-dfn-type="attribute" data-export data-readonly data-type="boolean" id="dom-usbinterface-claimed"><code><c- g>claimed</c-></code></dfn>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①④"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①③"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbalternateinterface"><code><c- g>USBAlternateInterface</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBAlternateInterface" data-dfn-type="constructor" data-export data-lt="USBAlternateInterface(deviceInterface, alternateSetting)|constructor(deviceInterface, alternateSetting)" id="dom-usbalternateinterface-usbalternateinterface"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-usbalternateinterface-usbalternateinterface"></a></dfn>(<a class="n" data-link-type="idl-name" href="#usbinterface" id="ref-for-usbinterface①"><c- n>USBInterface</c-></a> <dfn class="idl-code" data-dfn-for="USBAlternateInterface/USBAlternateInterface(deviceInterface, alternateSetting), USBAlternateInterface/constructor(deviceInterface, alternateSetting)" data-dfn-type="argument" data-export id="dom-usbalternateinterface-usbalternateinterface-deviceinterface-alternatesetting-deviceinterface"><code><c- g>deviceInterface</c-></code><a class="self-link" href="#dom-usbalternateinterface-usbalternateinterface-deviceinterface-alternatesetting-deviceinterface"></a></dfn>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②⑦"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBAlternateInterface/USBAlternateInterface(deviceInterface, alternateSetting), USBAlternateInterface/constructor(deviceInterface, alternateSetting)" data-dfn-type="argument" data-export id="dom-usbalternateinterface-usbalternateinterface-deviceinterface-alternatesetting-alternatesetting"><code><c- g>alternateSetting</c-></code><a class="self-link" href="#dom-usbalternateinterface-usbalternateinterface-deviceinterface-alternatesetting-alternatesetting"></a></dfn>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②⑧"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBAlternateInterface" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbalternateinterface-alternatesetting"><code><c- g>alternateSetting</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②⑨"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBAlternateInterface" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbalternateinterface-interfaceclass"><code><c- g>interfaceClass</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③⓪"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBAlternateInterface" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbalternateinterface-interfacesubclass"><code><c- g>interfaceSubclass</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③①"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBAlternateInterface" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbalternateinterface-interfaceprotocol"><code><c- g>interfaceProtocol</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑥"><c- b>DOMString</c-></a>? <dfn class="dfn-paneled idl-code" data-dfn-for="USBAlternateInterface" data-dfn-type="attribute" data-export data-readonly data-type="DOMString?" id="dom-usbalternateinterface-interfacename"><code><c- g>interfaceName</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbendpoint" id="ref-for-usbendpoint"><c- n>USBEndpoint</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBAlternateInterface" data-dfn-type="attribute" data-export data-readonly data-type="FrozenArray<USBEndpoint>" id="dom-usbalternateinterface-endpoints"><code><c- g>endpoints</c-></code></dfn>;
};
</pre>
   <p>Each interface provides a collection of <code class="idl"><a data-link-type="idl" href="#dom-usbinterface-alternates" id="ref-for-dom-usbinterface-alternates">alternates</a></code> identified
by a single <code>bInterfaceNumber</code> field found in their <a data-link-type="dfn" href="#interface-descriptor" id="ref-for-interface-descriptor③">interface
descriptors</a>. The <code class="idl"><a data-link-type="idl" href="#dom-usbinterface-interfacenumber" id="ref-for-dom-usbinterface-interfacenumber">interfaceNumber</a></code> attribute MUST match this
field.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbinterface-alternate" id="ref-for-dom-usbinterface-alternate">alternate</a></code> attribute SHALL be set to the <code class="idl"><a data-link-type="idl" href="#usbalternateinterface" id="ref-for-usbalternateinterface②">USBAlternateInterface</a></code> that is currently selected for this interface, which
by default SHALL be the one with <code>bAlternateSetting</code> equal to <code>0</code>.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbinterface-alternates" id="ref-for-dom-usbinterface-alternates①">alternates</a></code> attribute SHALL contain a list of all alternate
interface configurations available for this interface.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbinterface-claimed" id="ref-for-dom-usbinterface-claimed①②">claimed</a></code> attribute SHALL be set to <code>true</code> when
the interface is claimed by the current execution context and SHALL be set to <code>false</code> otherwise.</p>
   <p>Each alternative interface configuration SHALL have a unique <code class="idl"><a data-link-type="idl" href="#dom-usbalternateinterface-alternatesetting" id="ref-for-dom-usbalternateinterface-alternatesetting">alternateSetting</a></code> within a given interface that
matches the <code>bAlternateSetting</code> field of the <a data-link-type="dfn" href="#interface-descriptor" id="ref-for-interface-descriptor④">interface
descriptor</a> that defines it.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbalternateinterface-interfaceclass" id="ref-for-dom-usbalternateinterface-interfaceclass">interfaceClass</a></code>, <code class="idl"><a data-link-type="idl" href="#dom-usbalternateinterface-interfacesubclass" id="ref-for-dom-usbalternateinterface-interfacesubclass">interfaceSubclass</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-usbalternateinterface-interfaceprotocol" id="ref-for-dom-usbalternateinterface-interfaceprotocol">interfaceProtocol</a></code> attributes declare the
communication interface supported by the interface. They MUST correspond
respectively to the values of the <code>bInterfaceClass</code>, <code>bInterfaceSubClass</code> and <code>bInterfaceProtocol</code> fields of
the <a data-link-type="dfn" href="#interface-descriptor" id="ref-for-interface-descriptor⑤">interface descriptor</a>.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbalternateinterface-interfacename" id="ref-for-dom-usbalternateinterface-interfacename">interfaceName</a></code> attribute SHOULD contain the value
of the <a data-link-type="dfn" href="#string-descriptor" id="ref-for-string-descriptor③">string descriptor</a> indexed by the <code>iInterface</code> field of
the <a data-link-type="dfn" href="#interface-descriptor" id="ref-for-interface-descriptor⑥">interface descriptor</a>, if defined.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbalternateinterface-endpoints" id="ref-for-dom-usbalternateinterface-endpoints">endpoints</a></code> attribute SHALL contain a list of
endpoints exposed by this interface. These endpoints SHALL by populated from
the <a data-link-type="dfn" href="#endpoint-descriptor" id="ref-for-endpoint-descriptor">endpoint descriptors</a> contained within this <a data-link-type="dfn" href="#interface-descriptor" id="ref-for-interface-descriptor⑦">interface descriptor</a> and the number of elements in this sequence SHALL
match the value of the <code>bNumEndpoints</code> field of the <a data-link-type="dfn" href="#interface-descriptor" id="ref-for-interface-descriptor⑧">interface descriptor</a>.</p>
   <p>A device’s <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="active-configuration">active configuration</dfn> is the combination of the <code class="idl"><a data-link-type="idl" href="#usbconfiguration" id="ref-for-usbconfiguration③">USBConfiguration</a></code> selected by calling <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-selectconfiguration" id="ref-for-dom-usbdevice-selectconfiguration③">selectConfiguration(configurationValue)</a></code> and the set of <code class="idl"><a data-link-type="idl" href="#usbalternateinterface" id="ref-for-usbalternateinterface③">USBAlternateInterface</a></code>s selected by calling <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-selectalternateinterface" id="ref-for-dom-usbdevice-selectalternateinterface①">selectAlternateInterface(interfaceNumber, alternateSetting)</a></code>.  A
device MAY, by default, be left in an unconfigured state, referred to as
configuration <code>0</code> or may automatically be set to whatever
configuration has <code>bConfigurationValue</code> equal to <code>1</code>.
When a configuration is set all interfaces within that configuration
automatically have the <code class="idl"><a data-link-type="idl" href="#usbalternateinterface" id="ref-for-usbalternateinterface④">USBAlternateInterface</a></code> with <code>bAlternateSetting</code> equal to <code>0</code> selected by default. It
is therefore unnecessary to call <code class="idl"><a data-link-type="idl" href="#dom-usbdevice-selectalternateinterface" id="ref-for-dom-usbdevice-selectalternateinterface②">selectAlternateInterface(interfaceNumber, alternateSetting)</a></code> with <var>alternateSetting</var> equal to <code>0</code> for each interface when opening a
device.</p>
   <h3 class="heading settled" data-level="6.4" id="endpoints"><span class="secno">6.4. </span><span class="content">Endpoints</span><a class="self-link" href="#endpoints"></a></h3>
<pre class="idl highlight def"><c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-usbdirection"><code><c- g>USBDirection</c-></code></dfn> {
  <dfn class="dfn-paneled idl-code" data-dfn-for="USBDirection" data-dfn-type="enum-value" data-export id="dom-usbdirection-in"><code><c- s>"in"</c-></code></dfn>,
  <dfn class="dfn-paneled idl-code" data-dfn-for="USBDirection" data-dfn-type="enum-value" data-export id="dom-usbdirection-out"><code><c- s>"out"</c-></code></dfn>
};

<c- b>enum</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="enum" data-export id="enumdef-usbendpointtype"><code><c- g>USBEndpointType</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBEndpointType" data-dfn-type="enum-value" data-export id="dom-usbendpointtype-bulk"><code><c- s>"bulk"</c-></code><a class="self-link" href="#dom-usbendpointtype-bulk"></a></dfn>,
  <dfn class="idl-code" data-dfn-for="USBEndpointType" data-dfn-type="enum-value" data-export id="dom-usbendpointtype-interrupt"><code><c- s>"interrupt"</c-></code><a class="self-link" href="#dom-usbendpointtype-interrupt"></a></dfn>,
  <dfn class="idl-code" data-dfn-for="USBEndpointType" data-dfn-type="enum-value" data-export id="dom-usbendpointtype-isochronous"><code><c- s>"isochronous"</c-></code><a class="self-link" href="#dom-usbendpointtype-isochronous"></a></dfn>
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑤"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①④"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbendpoint"><code><c- g>USBEndpoint</c-></code></dfn> {
  <dfn class="idl-code" data-dfn-for="USBEndpoint" data-dfn-type="constructor" data-export data-lt="USBEndpoint(alternate, endpointNumber, direction)|constructor(alternate, endpointNumber, direction)" id="dom-usbendpoint-usbendpoint"><code><c- g>constructor</c-></code><a class="self-link" href="#dom-usbendpoint-usbendpoint"></a></dfn>(<a class="n" data-link-type="idl-name" href="#usbalternateinterface" id="ref-for-usbalternateinterface⑤"><c- n>USBAlternateInterface</c-></a> <dfn class="idl-code" data-dfn-for="USBEndpoint/USBEndpoint(alternate, endpointNumber, direction), USBEndpoint/constructor(alternate, endpointNumber, direction)" data-dfn-type="argument" data-export id="dom-usbendpoint-usbendpoint-alternate-endpointnumber-direction-alternate"><code><c- g>alternate</c-></code><a class="self-link" href="#dom-usbendpoint-usbendpoint-alternate-endpointnumber-direction-alternate"></a></dfn>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③②"><c- b>octet</c-></a> <dfn class="idl-code" data-dfn-for="USBEndpoint/USBEndpoint(alternate, endpointNumber, direction), USBEndpoint/constructor(alternate, endpointNumber, direction)" data-dfn-type="argument" data-export id="dom-usbendpoint-usbendpoint-alternate-endpointnumber-direction-endpointnumber"><code><c- g>endpointNumber</c-></code><a class="self-link" href="#dom-usbendpoint-usbendpoint-alternate-endpointnumber-direction-endpointnumber"></a></dfn>, <a class="n" data-link-type="idl-name" href="#enumdef-usbdirection" id="ref-for-enumdef-usbdirection①"><c- n>USBDirection</c-></a> <dfn class="idl-code" data-dfn-for="USBEndpoint/USBEndpoint(alternate, endpointNumber, direction), USBEndpoint/constructor(alternate, endpointNumber, direction)" data-dfn-type="argument" data-export id="dom-usbendpoint-usbendpoint-alternate-endpointnumber-direction-direction"><code><c- g>direction</c-></code><a class="self-link" href="#dom-usbendpoint-usbendpoint-alternate-endpointnumber-direction-direction"></a></dfn>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③③"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBEndpoint" data-dfn-type="attribute" data-export data-readonly data-type="octet" id="dom-usbendpoint-endpointnumber"><code><c- g>endpointNumber</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbdirection" id="ref-for-enumdef-usbdirection②"><c- n>USBDirection</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBEndpoint" data-dfn-type="attribute" data-export data-readonly data-type="USBDirection" id="dom-usbendpoint-direction"><code><c- g>direction</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbendpointtype" id="ref-for-enumdef-usbendpointtype"><c- n>USBEndpointType</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBEndpoint" data-dfn-type="attribute" data-export data-readonly data-type="USBEndpointType" id="dom-usbendpoint-type"><code><c- g>type</c-></code></dfn>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑦"><c- b>unsigned</c-> <c- b>long</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="USBEndpoint" data-dfn-type="attribute" data-export data-readonly data-type="unsigned long" id="dom-usbendpoint-packetsize"><code><c- g>packetSize</c-></code></dfn>;
};
</pre>
   <p>Each endpoint within a particular device configuration SHALL have a unique
combination of <code class="idl"><a data-link-type="idl" href="#dom-usbendpoint-endpointnumber" id="ref-for-dom-usbendpoint-endpointnumber">endpointNumber</a></code> and <code class="idl"><a data-link-type="idl" href="#dom-usbendpoint-direction" id="ref-for-dom-usbendpoint-direction">direction</a></code>.
The <code class="idl"><a data-link-type="idl" href="#dom-usbendpoint-endpointnumber" id="ref-for-dom-usbendpoint-endpointnumber①">endpointNumber</a></code> MUST equal the 4 least significant bits of
the <code>bEndpointAddress</code> field of the <a data-link-type="dfn" href="#endpoint-descriptor" id="ref-for-endpoint-descriptor①">endpoint descriptor</a> defining the endpoint.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbendpoint-direction" id="ref-for-dom-usbendpoint-direction①">direction</a></code> attribute declares the transfer direction
supported by this endpoint and is equal to <code class="idl"><a data-link-type="idl" href="#dom-usbdirection-in" id="ref-for-dom-usbdirection-in①">"in"</a></code> if the most
significant bit of the <code>bEndpointAddress</code> is set and <code class="idl"><a data-link-type="idl" href="#dom-usbdirection-out" id="ref-for-dom-usbdirection-out①">"out"</a></code> otherwise. An endpoint may either carry data <code>IN</code> from the device to host or <code>OUT</code> from host to device.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbendpoint-type" id="ref-for-dom-usbendpoint-type">type</a></code> attribute declares the type of data transfer supported
by this endpoint.</p>
   <p>The <code class="idl"><a data-link-type="idl" href="#dom-usbendpoint-packetsize" id="ref-for-dom-usbendpoint-packetsize">packetSize</a></code> attribute declares the packet size employed by
this endpoint and MUST be equal to the value of the <code>wMaxPacketSize</code> of the <a data-link-type="dfn" href="#endpoint-descriptor" id="ref-for-endpoint-descriptor②">endpoint descriptor</a> defining it. In a High-Speed, High-Bandwidth
endpoint this value will include the multiplication factor provided by issuing
multiple transactions per microframe. In a SuperSpeed device this value will
include the multiplication factor provided by the <code>bMaxBurst</code> field
of the SuperSpeed Endpoint Companion descriptor.</p>
   <h2 class="heading settled" data-level="7" id="integrations"><span class="secno">7. </span><span class="content">Integrations</span><a class="self-link" href="#integrations"></a></h2>
   <h3 class="heading settled" data-level="7.1" id="feature-policy"><span class="secno">7.1. </span><span class="content">Feature Policy</span><a class="self-link" href="#feature-policy"></a></h3>
   <p>This specification defines a <a data-link-type="dfn" href="https://wicg.github.io/feature-policy/#feature" id="ref-for-feature">feature</a> that controls whether the <code class="idl"><a data-link-type="idl" href="#dom-navigator-usb" id="ref-for-dom-navigator-usb②">usb</a></code> attribute is exposed on the <code class="idl"><a data-link-type="idl" href="https://html.spec.whatwg.org/multipage/system-state.html#navigator" id="ref-for-navigator①">Navigator</a></code> object.</p>
   <p>The <a data-link-type="dfn" href="https://wicg.github.io/feature-policy/#feature-name" id="ref-for-feature-name">feature name</a> for this feature is <code>"usb"</code>.</p>
   <p>The <a data-link-type="dfn" href="https://wicg.github.io/feature-policy/#default-allowlist" id="ref-for-default-allowlist">default allowlist</a> for this feature is <code>["self"]</code>.</p>
   <h3 class="heading settled" data-level="7.2" id="permission-api"><span class="secno">7.2. </span><span class="content">Permission API</span><a class="self-link" href="#permission-api"></a></h3>
   <p>The <a data-link-type="biblio" href="#biblio-permissions">[permissions]</a> API provides a uniform way for websites to request
permissions from users and query which permissions they have.</p>
   <p>The <dfn class="idl-code" data-dfn-for="PermissionName" data-dfn-type="enum-value" data-export id="dom-permissionname-usb"><code>"usb"</code><a class="self-link" href="#dom-permissionname-usb"></a></dfn> <a data-link-type="dfn" href="https://w3c.github.io/permissions/#powerful-feature" id="ref-for-powerful-feature">powerful feature</a> is
defined as follows:</p>
   <dl>
    <dt><a data-link-type="dfn" href="https://w3c.github.io/permissions/#permission-descriptor-type" id="ref-for-permission-descriptor-type">permission descriptor type</a>
    <dd>
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-usbpermissiondescriptor"><code><c- g>USBPermissionDescriptor</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://w3c.github.io/permissions/#dictdef-permissiondescriptor" id="ref-for-dictdef-permissiondescriptor"><c- n>PermissionDescriptor</c-></a> {
  <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-usbdevicefilter" id="ref-for-dictdef-usbdevicefilter②"><c- n>USBDeviceFilter</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBPermissionDescriptor" data-dfn-type="dict-member" data-export data-type="sequence<USBDeviceFilter> " id="dom-usbpermissiondescriptor-filters"><code><c- g>filters</c-></code></dfn>;
};
</pre>
    <dt><a data-link-type="dfn" href="https://w3c.github.io/permissions/#extra-permission-data-type" id="ref-for-extra-permission-data-type">extra permission data type</a>
    <dd>
      <code class="idl"><a data-link-type="idl" href="#dictdef-usbpermissionstorage" id="ref-for-dictdef-usbpermissionstorage⑤">USBPermissionStorage</a></code>, defined as: 
<pre class="idl highlight def"><c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-allowedusbdevice"><code><c- g>AllowedUSBDevice</c-></code></dfn> {
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③④"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="AllowedUSBDevice" data-dfn-type="dict-member" data-export data-type="octet " id="dom-allowedusbdevice-vendorid"><code><c- g>vendorId</c-></code></dfn>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③⑤"><c- b>octet</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="AllowedUSBDevice" data-dfn-type="dict-member" data-export data-type="octet " id="dom-allowedusbdevice-productid"><code><c- g>productId</c-></code></dfn>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑦"><c- b>DOMString</c-></a> <dfn class="dfn-paneled idl-code" data-dfn-for="AllowedUSBDevice" data-dfn-type="dict-member" data-export data-type="DOMString " id="dom-allowedusbdevice-serialnumber"><code><c- g>serialNumber</c-></code></dfn>;
};

<c- b>dictionary</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="dictionary" data-export id="dictdef-usbpermissionstorage"><code><c- g>USBPermissionStorage</c-></code></dfn> {
  <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-allowedusbdevice" id="ref-for-dictdef-allowedusbdevice"><c- n>AllowedUSBDevice</c-></a>> <dfn class="dfn-paneled idl-code" data-default="[]" data-dfn-for="USBPermissionStorage" data-dfn-type="dict-member" data-export data-type="sequence<AllowedUSBDevice> " id="dom-usbpermissionstorage-alloweddevices"><code><c- g>allowedDevices</c-></code></dfn> = [];
};
</pre>
     <p><code class="idl"><a data-link-type="idl" href="#dictdef-allowedusbdevice" id="ref-for-dictdef-allowedusbdevice①">AllowedUSBDevice</a></code> instances have an internal slot <dfn class="dfn-paneled idl-code" data-dfn-for="AllowedUSBDevice" data-dfn-type="attribute" data-export id="dom-allowedusbdevice-devices-slot"><code>[[devices]]</code></dfn> that holds an
    array of <a data-link-type="dfn" href="#usb-device" id="ref-for-usb-device④">USB devices</a>.</p>
    <dt><a data-link-type="dfn" href="https://w3c.github.io/permissions/#permission-result-type" id="ref-for-permission-result-type">permission result type</a>
    <dd>
<pre class="idl highlight def">[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑥"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->)]
<c- b>interface</c-> <dfn class="dfn-paneled idl-code" data-dfn-type="interface" data-export id="usbpermissionresult"><code><c- g>USBPermissionResult</c-></code></dfn> : <a class="n" data-link-type="idl-name" href="https://w3c.github.io/permissions/#permissionstatus" id="ref-for-permissionstatus"><c- n>PermissionStatus</c-></a> {
  <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbdevice" id="ref-for-usbdevice①⑧"><c- n>USBDevice</c-></a>> <dfn class="dfn-paneled idl-code" data-dfn-for="USBPermissionResult" data-dfn-type="attribute" data-export data-type="FrozenArray<USBDevice>" id="dom-usbpermissionresult-devices"><code><c- g>devices</c-></code></dfn>;
};
</pre>
    <dt><a data-link-type="dfn" href="https://w3c.github.io/permissions/#permission-query-algorithm" id="ref-for-permission-query-algorithm">permission query algorithm</a>
    <dd>
      To <strong><em>query the "usb" permission</em></strong> with a <code class="idl"><a data-link-type="idl" href="#dictdef-usbpermissiondescriptor" id="ref-for-dictdef-usbpermissiondescriptor①">USBPermissionDescriptor</a></code> <var>desc</var>, a <code class="idl"><a data-link-type="idl" href="#dictdef-usbpermissionstorage" id="ref-for-dictdef-usbpermissionstorage⑥">USBPermissionStorage</a></code> <var>storage</var>,
    and a <code class="idl"><a data-link-type="idl" href="#usbpermissionresult" id="ref-for-usbpermissionresult①">USBPermissionResult</a></code> <var>status</var>, the UA must: 
     <ol>
      <li data-md>
       <p>If <code><var>desc</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissiondescriptor-filters" id="ref-for-dom-usbpermissiondescriptor-filters②">filters</a></code></code> is set then,
 for each <var>filter</var> in <code><var>desc</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissiondescriptor-filters" id="ref-for-dom-usbpermissiondescriptor-filters③">filters</a></code></code> if <var>filter</var> <a data-link-type="dfn" href="#is-not-a-valid-filter" id="ref-for-is-not-a-valid-filter①">is not a valid filter</a> then raise a <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror" id="ref-for-sec-native-error-types-used-in-this-standard-typeerror①">TypeError</a></code> and abort these
 steps.</p>
      <li data-md>
       <p>Set <code><var>status</var>.<code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#dom-permissionstatus-state" id="ref-for-dom-permissionstatus-state①">state</a></code></code> to <code class="idl"><a data-link-type="idl" href="https://w3c.github.io/permissions/#dom-permissionstate-prompt" id="ref-for-dom-permissionstate-prompt">"prompt"</a></code>.</p>
      <li data-md>
       <p>Let <var>matchingDevices</var> be a new <code class="idl"><a data-link-type="idl" href="https://tc39.github.io/ecma262/#sec-array-objects" id="ref-for-sec-array-objects①">Array</a></code>.</p>
      <li data-md>
       <p>For each <var>allowedDevice</var> in <code><var>storage</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissionstorage-alloweddevices" id="ref-for-dom-usbpermissionstorage-alloweddevices⑥">allowedDevices</a></code></code> and
 for each <var>device</var> in <code><var>allowedDevice</var>@<code class="idl"><a data-link-type="idl" href="#dom-allowedusbdevice-devices-slot" id="ref-for-dom-allowedusbdevice-devices-slot⑦">[[devices]]</a></code></code>, run
 the following substeps:</p>
       <ol>
        <li data-md>
         <p>If <code><var>desc</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissiondescriptor-filters" id="ref-for-dom-usbpermissiondescriptor-filters④">filters</a></code></code> is set
  and <var>device</var> does not <a data-link-type="dfn" href="#match-a-device-filter" id="ref-for-match-a-device-filter①">match a device filter</a> in <code><var>desc</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissiondescriptor-filters" id="ref-for-dom-usbpermissiondescriptor-filters⑤">filters</a></code></code>, continue
  to the next <var>device</var>.</p>
        <li data-md>
         <p>Get the <code class="idl"><a data-link-type="idl" href="#usbdevice" id="ref-for-usbdevice①⑨">USBDevice</a></code> representing <var>device</var> and add it to <var>matchingDevices</var>.</p>
       </ol>
      <li data-md>
       <p>Set <code><var>status</var>.<code class="idl"><a data-link-type="idl" href="#dom-usbpermissionresult-devices" id="ref-for-dom-usbpermissionresult-devices④">devices</a></code></code> to a new <code class="idl"><a data-link-type="idl" href="https://heycam.github.io/webidl/#idl-frozen-array" id="ref-for-idl-frozen-array②">FrozenArray</a></code> whose contents are <var>matchingDevices</var>.</p>
     </ol>
    <dt><a data-link-type="dfn" href="https://wicg.github.io/permissions-request/#permission-request-algorithm" id="ref-for-permission-request-algorithm">permission request algorithm</a>
    <dd><a data-link-type="dfn" href="#request-the-usb-permission" id="ref-for-request-the-usb-permission">Request the "usb" permission</a>.
   </dl>
   <h2 class="heading settled" data-level="8" id="terminology"><span class="secno">8. </span><span class="content">Terminology</span><a class="self-link" href="#terminology"></a></h2>
   <p>This specification uses several terms taken from <a data-link-type="biblio" href="#biblio-usb31">[USB31]</a>. While
reference is made to version 3.1 of the Universal Serial Bus many of
these concepts exist in previous versions as well. Significant
differences between USB versions that have bearing on this specification
will be called out explicitly.</p>
   <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="descriptors">Descriptors</dfn> are binary data structures that can be read from
a device and describe its properties and function:</p>
   <ul>
    <li data-md>
     <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="device-descriptor">device descriptor</dfn> contains information applicable to
the entire devices and is described in section 9.6.1 of <a data-link-type="biblio" href="#biblio-usb31">[USB31]</a>.</p>
    <li data-md>
     <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="configuration-descriptor">configuration descriptor</dfn> describes a particular set of
device interfaces and endpoints that can be selected by the host.
Its fields are described in section 9.6.3 of <a data-link-type="biblio" href="#biblio-usb31">[USB31]</a>.</p>
    <li data-md>
     <p>An <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="interface-descriptor">interface descriptor</dfn> describes the interface of a particular
functional component of a device including its protocol and communication
endpoints. Its fields are described in section 9.6.5 of <a data-link-type="biblio" href="#biblio-usb31">[USB31]</a>.</p>
    <li data-md>
     <p>An <strong><em>interface association descriptor</em></strong> creates an association between multiple interfaces that are part of a single
functional unit of a device. Its fields are described in section
9.6.4 of <a data-link-type="biblio" href="#biblio-usb31">[USB31]</a>.</p>
    <li data-md>
     <p>An <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="endpoint-descriptor">endpoint descriptor</dfn> describes a channel through which
data is either sent to or received from the device. Its fields are
described in section 9.6.6 of <a data-link-type="biblio" href="#biblio-usb31">[USB31]</a>.</p>
    <li data-md>
     <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="string-descriptor">string descriptor</dfn> contains a single UTF16-LE string and is
referenced by index by other descriptors. Its fields are described in
section 9.6.9 of <a data-link-type="biblio" href="#biblio-usb31">[USB31]</a>.</p>
   </ul>
   <p>The <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="binary-object-store">Binary Object Store</dfn> (<abbr title="Binary Object Store">BOS</abbr>) is an additional set of
descriptors that are more free-form than the standard device
descriptors. Of note is the <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="platform-descriptor">Platform Descriptor</dfn> type which
allows third parties (such as this specification) to declare their own
types of descriptors. Each of these is identified by a UUID. The Binary
Object Store is described in section 9.6.2 of <a data-link-type="biblio" href="#biblio-usb31">[USB31]</a>.</p>
   <p>A <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="usb-device">USB device</dfn> has a single <a data-link-type="dfn" href="#device-descriptor" id="ref-for-device-descriptor⑦">device descriptor</a> which links to
one or more <a data-link-type="dfn" href="#configuration-descriptor" id="ref-for-configuration-descriptor③">configuration descriptors</a>. It’s <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="vendor-id">vendor ID</dfn> is
assigned to the device manufacturer by the USB-IF and is stored in the <code>idVendor</code> field of the <a data-link-type="dfn" href="#device-descriptor" id="ref-for-device-descriptor⑧">device descriptor</a>. It’s <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="product ID" data-noexport id="product-id">product
ID</dfn> is assigned by the manufacturer and is stored in the <code>idProduct</code> field of the <a data-link-type="dfn" href="#device-descriptor" id="ref-for-device-descriptor⑨">device descriptor</a>. It’s <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="serial number" data-noexport id="serial-number">serial
number</dfn> is an optional property that is defined if the <code>iSerialNumber</code> field of the <a data-link-type="dfn" href="#device-descriptor" id="ref-for-device-descriptor①⓪">device descriptor</a> is not equal
to <code>0</code> and is the <a data-link-type="dfn" href="#string-descriptor" id="ref-for-string-descriptor④">string descriptor</a> referred to by that index.</p>
   <h2 class="heading settled" data-level="9" id="appendix-intro"><span class="secno">9. </span><span class="content">Appendix: A Brief Introduction to USB</span><a class="self-link" href="#appendix-intro"></a></h2>
   <p><em>This section is non-normative</em>.</p>
   <p>USB is a network but it’s very different from traditional TCP/IP networks. It is
really more like an RPC system. All traffic is directed by the host, that is,
your computer. Though some devices like smartphones can act as both a USB host
and USB client they can only take on one role at a time.</p>
   <h3 class="heading settled" data-level="9.1" id="appendix-descriptors"><span class="secno">9.1. </span><span class="content">Descriptors</span><a class="self-link" href="#appendix-descriptors"></a></h3>
   <p>USB devices identify themselves to the host by providing a set of binary
structures known as <a data-link-type="dfn" href="#descriptors" id="ref-for-descriptors">descriptors</a>. The first one read by the host is the <a data-link-type="dfn" href="#device-descriptor" id="ref-for-device-descriptor①①">device descriptor</a> which contains basic information such as the vendor and
product IDs assigned by the USB-IF and the manufacturer. The host may then read
the device’s <a data-link-type="dfn" href="#configuration-descriptor" id="ref-for-configuration-descriptor④">configuration descriptor</a> which is a description of the
device’s capabilities including the interfaces and endpoints it exposes. A class
can be declared at the device level or for individual interfaces. A device with
multiple interfaces providing different functions is known as a <strong><em>composite device</em></strong>.</p>
   <h3 class="heading settled" data-level="9.2" id="appendix-transfers"><span class="secno">9.2. </span><span class="content">Transfers</span><a class="self-link" href="#appendix-transfers"></a></h3>
   <p>Whether data is traveling from host to device or the other way around the
transfer is always initiated by the host. <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="out-transfers">OUT transfers</dfn> carry data from host to
device and may wait until the device acknowledges the data has been received. <dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="in-transfers">IN transfers</dfn> carry data from device to
host and may have to wait until the device has some data to send. Transfers are
executed against one of a device’s endpoints and there are different kinds
depending on what type of traffic is being sent.</p>
   <ul>
    <li data-md>
     <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="bulk-transfers">Bulk transfers</dfn> are good for sending lots of data with whatever
bandwidth is available. This is what is used to read and write data to USB
mass storage devices.</p>
    <li data-md>
     <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="interrupt-transfers">Interrupt transfers</dfn> offer guaranteed latency (by reserving
bandwidth so that they can’t be blocked by a large <a data-link-type="dfn" href="#bulk-transfers" id="ref-for-bulk-transfers②">bulk transfers</a>)
but with limited packet sizes. These are used for signaling and for small
packets like mouse movements and button presses.</p>
    <li data-md>
     <p><dfn class="dfn-paneled" data-dfn-type="dfn" data-noexport id="isochronous-transfers">Isochronous transfers</dfn> also reserve
bandwidth but they don’t guarantee delivery. They’re used for streaming data
like audio and video.</p>
    <li data-md>
     <p>Every device also has a special <dfn class="dfn-paneled" data-dfn-type="dfn" data-lt="default endpoint|default control pipe" data-noexport id="default-endpoint">default endpoint</dfn>. While regular
endpoints only carry data in one direction or the other <a data-link-type="dfn" href="#control-transfer" id="ref-for-control-transfer⑨">control transfers</a> have a small header called the <a data-link-type="dfn" href="#setup-packet" id="ref-for-setup-packet⑤">SETUP packet</a> that is always sent to the device and contains request
parameters in addition to a larger data payload that can be either IN or OUT.</p>
   </ul>
  </main>
  <div data-fill-with="conformance">
   <h2 class="no-ref no-num heading settled" id="conformance"><span class="content"> Conformance</span><a class="self-link" href="#conformance"></a></h2>
   <p> Conformance requirements are expressed with a combination of descriptive assertions and RFC 2119 terminology.
            The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL”
            in the normative parts of this document
            are to be interpreted as described in RFC 2119.
            However, for readability,
            these words do not appear in all uppercase letters in this specification. </p>
   <p> All of the text of this specification is normative
            except sections explicitly marked as non-normative, examples, and notes. <a data-link-type="biblio" href="#biblio-rfc2119">[RFC2119]</a> </p>
   <p> Examples in this specification are introduced with the words “for example”
            or are set apart from the normative text with <code>class="example"</code>, like this: </p>
   <div class="example" id="example-example"><a class="self-link" href="#example-example"></a> This is an example of an informative example. </div>
   <p> Informative notes begin with the word “Note”
            and are set apart from the normative text with <code>class="note"</code>, like this: </p>
   <p class="note" role="note"> Note, this is an informative note. </p>
  </div>
<script>
(function() {
  "use strict";
  var collapseSidebarText = '<span aria-hidden="true">←</span> '
                          + '<span>Collapse Sidebar</span>';
  var expandSidebarText   = '<span aria-hidden="true">→</span> '
                          + '<span>Pop Out Sidebar</span>';
  var tocJumpText         = '<span aria-hidden="true">↑</span> '
                          + '<span>Jump to Table of Contents</span>';

  var sidebarMedia = window.matchMedia('screen and (min-width: 78em)');
  var autoToggle   = function(e){ toggleSidebar(e.matches) };
  if(sidebarMedia.addListener) {
    sidebarMedia.addListener(autoToggle);
  }

  function toggleSidebar(on) {
    if (on == undefined) {
      on = !document.body.classList.contains('toc-sidebar');
    }

    /* Don’t scroll to compensate for the ToC if we’re above it already. */
    var headY = 0;
    var head = document.querySelector('.head');
    if (head) {
      // terrible approx of "top of ToC"
      headY += head.offsetTop + head.offsetHeight;
    }
    var skipScroll = window.scrollY < headY;

    var toggle = document.getElementById('toc-toggle');
    var tocNav = document.getElementById('toc');
    if (on) {
      var tocHeight = tocNav.offsetHeight;
      document.body.classList.add('toc-sidebar');
      document.body.classList.remove('toc-inline');
      toggle.innerHTML = collapseSidebarText;
      if (!skipScroll) {
        window.scrollBy(0, 0 - tocHeight);
      }
      tocNav.focus();
      sidebarMedia.addListener(autoToggle); // auto-collapse when out of room
    }
    else {
      document.body.classList.add('toc-inline');
      document.body.classList.remove('toc-sidebar');
      toggle.innerHTML = expandSidebarText;
      if (!skipScroll) {
        window.scrollBy(0, tocNav.offsetHeight);
      }
      if (toggle.matches(':hover')) {
        /* Unfocus button when not using keyboard navigation,
           because I don’t know where else to send the focus. */
        toggle.blur();
      }
    }
  }

  function createSidebarToggle() {
    /* Create the sidebar toggle in JS; it shouldn’t exist when JS is off. */
    var toggle = document.createElement('a');
      /* This should probably be a button, but appearance isn’t standards-track.*/
    toggle.id = 'toc-toggle';
    toggle.class = 'toc-toggle';
    toggle.href = '#toc';
    toggle.innerHTML = collapseSidebarText;

    sidebarMedia.addListener(autoToggle);
    var toggler = function(e) {
      e.preventDefault();
      sidebarMedia.removeListener(autoToggle); // persist explicit off states
      toggleSidebar();
      return false;
    }
    toggle.addEventListener('click', toggler, false);


    /* Get <nav id=toc-nav>, or make it if we don’t have one. */
    var tocNav = document.getElementById('toc-nav');
    if (!tocNav) {
      tocNav = document.createElement('p');
      tocNav.id = 'toc-nav';
      /* Prepend for better keyboard navigation */
      document.body.insertBefore(tocNav, document.body.firstChild);
    }
    /* While we’re at it, make sure we have a Jump to Toc link. */
    var tocJump = document.getElementById('toc-jump');
    if (!tocJump) {
      tocJump = document.createElement('a');
      tocJump.id = 'toc-jump';
      tocJump.href = '#toc';
      tocJump.innerHTML = tocJumpText;
      tocNav.appendChild(tocJump);
    }

    tocNav.appendChild(toggle);
  }

  var toc = document.getElementById('toc');
  if (toc) {
    createSidebarToggle();
    toggleSidebar(sidebarMedia.matches);

    /* If the sidebar has been manually opened and is currently overlaying the text
       (window too small for the MQ to add the margin to body),
       then auto-close the sidebar once you click on something in there. */
    toc.addEventListener('click', function(e) {
      if(e.target.tagName.toLowerCase() == "a" && document.body.classList.contains('toc-sidebar') && !sidebarMedia.matches) {
        toggleSidebar(false);
      }
    }, false);
  }
  else {
    console.warn("Can’t find Table of Contents. Please use <nav id='toc'> around the ToC.");
  }

  /* Wrap tables in case they overflow */
  var tables = document.querySelectorAll(':not(.overlarge) > table.data, :not(.overlarge) > table.index');
  var numTables = tables.length;
  for (var i = 0; i < numTables; i++) {
    var table = tables[i];
    var wrapper = document.createElement('div');
    wrapper.className = 'overlarge';
    table.parentNode.insertBefore(wrapper, table);
    wrapper.appendChild(table);
  }

})();
</script>
  <h2 class="no-num no-ref heading settled" id="index"><span class="content">Index</span><a class="self-link" href="#index"></a></h2>
  <h3 class="no-num no-ref heading settled" id="index-defined-here"><span class="content">Terms defined by this specification</span><a class="self-link" href="#index-defined-here"></a></h3>
  <ul class="index">
   <li><a href="#active-configuration">active configuration</a><span>, in §6.3</span>
   <li><a href="#add-device-to-storage">add device to storage</a><span>, in §5</span>
   <li><a href="#dom-usbpermissionstorage-alloweddevices">allowedDevices</a><span>, in §7.2</span>
   <li><a href="#dictdef-allowedusbdevice">AllowedUSBDevice</a><span>, in §7.2</span>
   <li><a href="#dom-usbinterface-alternate">alternate</a><span>, in §6.3</span>
   <li><a href="#dom-usbinterface-alternates">alternates</a><span>, in §6.3</span>
   <li><a href="#dom-usbalternateinterface-alternatesetting">alternateSetting</a><span>, in §6.3</span>
   <li><a href="#dom-usbtransferstatus-babble">"babble"</a><span>, in §6.1</span>
   <li><a href="#binary-object-store">Binary Object Store</a><span>, in §8</span>
   <li><a href="#dom-usbendpointtype-bulk">"bulk"</a><span>, in §6.4</span>
   <li><a href="#bulk-transfers">Bulk transfers</a><span>, in §9.2</span>
   <li>
    bytesWritten
    <ul>
     <li><a href="#dom-usbisochronousouttransferpacket-byteswritten">attribute for USBIsochronousOutTransferPacket</a><span>, in §6.1</span>
     <li><a href="#dom-usbouttransferresult-byteswritten">attribute for USBOutTransferResult</a><span>, in §6.1</span>
    </ul>
   <li><a href="#check-permissions-for-device">check permissions for device</a><span>, in §5</span>
   <li><a href="#check-the-validity-of-the-control-transfer-parameters">check the validity of the control transfer parameters</a><span>, in §6.1</span>
   <li><a href="#dom-usbinterface-claimed">claimed</a><span>, in §6.3</span>
   <li><a href="#dom-usbdevice-claiminterface">claimInterface(interfaceNumber)</a><span>, in §6</span>
   <li><a href="#dom-usbrequesttype-class">"class"</a><span>, in §6.1</span>
   <li><a href="#dom-usbdevicefilter-classcode">classCode</a><span>, in §5</span>
   <li><a href="#dom-usbdevice-clearhalt">clearHalt(direction, endpointNumber)</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-close">close()</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-configuration">configuration</a><span>, in §6</span>
   <li><a href="#configuration-descriptor">configuration descriptor</a><span>, in §8</span>
   <li><a href="#dom-usbconfiguration-configurationname">configurationName</a><span>, in §6.2</span>
   <li><a href="#dom-usbdevice-configurations">configurations</a><span>, in §6</span>
   <li><a href="#dom-usbconfiguration-configurationvalue">configurationValue</a><span>, in §6.2</span>
   <li><a href="#connect">connect</a><span>, in §5.1</span>
   <li><a href="#dom-usbendpoint-usbendpoint">constructor(alternate, endpointNumber, direction)</a><span>, in §6.4</span>
   <li><a href="#dom-usbinterface-usbinterface">constructor(configuration, interfaceNumber)</a><span>, in §6.3</span>
   <li><a href="#dom-usbconfiguration-usbconfiguration">constructor(device, configurationValue)</a><span>, in §6.2</span>
   <li><a href="#dom-usbalternateinterface-usbalternateinterface">constructor(deviceInterface, alternateSetting)</a><span>, in §6.3</span>
   <li>
    constructor(packets)
    <ul>
     <li><a href="#dom-usbisochronousintransferresult-usbisochronousintransferresult">constructor for USBIsochronousInTransferResult</a><span>, in §6.1</span>
     <li><a href="#dom-usbisochronousouttransferresult-usbisochronousouttransferresult">constructor for USBIsochronousOutTransferResult</a><span>, in §6.1</span>
    </ul>
   <li><a href="#dom-usbisochronousintransferresult-usbisochronousintransferresult">constructor(packets, data)</a><span>, in §6.1</span>
   <li>
    constructor(status)
    <ul>
     <li><a href="#dom-usbintransferresult-usbintransferresult">constructor for USBInTransferResult</a><span>, in §6.1</span>
     <li><a href="#dom-usbisochronousintransferpacket-usbisochronousintransferpacket">constructor for USBIsochronousInTransferPacket</a><span>, in §6.1</span>
     <li><a href="#dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket">constructor for USBIsochronousOutTransferPacket</a><span>, in §6.1</span>
     <li><a href="#dom-usbouttransferresult-usbouttransferresult">constructor for USBOutTransferResult</a><span>, in §6.1</span>
    </ul>
   <li>
    constructor(status, bytesWritten)
    <ul>
     <li><a href="#dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket">constructor for USBIsochronousOutTransferPacket</a><span>, in §6.1</span>
     <li><a href="#dom-usbouttransferresult-usbouttransferresult">constructor for USBOutTransferResult</a><span>, in §6.1</span>
    </ul>
   <li>
    constructor(status, data)
    <ul>
     <li><a href="#dom-usbintransferresult-usbintransferresult">constructor for USBInTransferResult</a><span>, in §6.1</span>
     <li><a href="#dom-usbisochronousintransferpacket-usbisochronousintransferpacket">constructor for USBIsochronousInTransferPacket</a><span>, in §6.1</span>
    </ul>
   <li><a href="#dom-usbconnectionevent-usbconnectionevent">constructor(type, eventInitDict)</a><span>, in §5.1</span>
   <li><a href="#control-transfer">control transfer</a><span>, in §6.1</span>
   <li><a href="#dom-usbdevice-controltransferin">controlTransferIn(setup, length)</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-controltransferout">controlTransferOut(setup)</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-controltransferout">controlTransferOut(setup, data)</a><span>, in §6</span>
   <li>
    data
    <ul>
     <li><a href="#dom-usbintransferresult-data">attribute for USBInTransferResult</a><span>, in §6.1</span>
     <li><a href="#dom-usbisochronousintransferpacket-data">attribute for USBIsochronousInTransferPacket</a><span>, in §6.1</span>
     <li><a href="#dom-usbisochronousintransferresult-data">attribute for USBIsochronousInTransferResult</a><span>, in §6.1</span>
    </ul>
   <li><a href="#data-stage">data stage</a><span>, in §6.1</span>
   <li><a href="#default-endpoint">default control pipe</a><span>, in §9.2</span>
   <li><a href="#default-endpoint">default endpoint</a><span>, in §9.2</span>
   <li><a href="#descriptors">Descriptors</a><span>, in §8</span>
   <li><a href="#dom-usbrecipient-device">"device"</a><span>, in §6.1</span>
   <li>
    device
    <ul>
     <li><a href="#dom-usbconnectionevent-device">attribute for USBConnectionEvent</a><span>, in §5.1</span>
     <li><a href="#dom-usbconnectioneventinit-device">dict-member for USBConnectionEventInit</a><span>, in §5.1</span>
    </ul>
   <li><a href="#dom-usbdevice-deviceclass">deviceClass</a><span>, in §6</span>
   <li><a href="#device-descriptor">device descriptor</a><span>, in §8</span>
   <li><a href="#dom-usbdevice-deviceprotocol">deviceProtocol</a><span>, in §6</span>
   <li><a href="#dom-usbpermissionresult-devices">devices</a><span>, in §7.2</span>
   <li><a href="#dom-allowedusbdevice-devices-slot">[[devices]]</a><span>, in §7.2</span>
   <li><a href="#dom-usbdevice-devicesubclass">deviceSubclass</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-deviceversionmajor">deviceVersionMajor</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-deviceversionminor">deviceVersionMinor</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-deviceversionsubminor">deviceVersionSubminor</a><span>, in §6</span>
   <li><a href="#dom-usbendpoint-direction">direction</a><span>, in §6.4</span>
   <li><a href="#disconnect">disconnect</a><span>, in §5.1</span>
   <li><a href="#dom-usbrecipient-endpoint">"endpoint"</a><span>, in §6.1</span>
   <li><a href="#endpoint-descriptor">endpoint descriptor</a><span>, in §8</span>
   <li><a href="#dom-usbendpoint-endpointnumber">endpointNumber</a><span>, in §6.4</span>
   <li><a href="#dom-usbalternateinterface-endpoints">endpoints</a><span>, in §6.3</span>
   <li><a href="#enumerate-all-devices-attached-to-the-system">enumerate all devices attached to the system</a><span>, in §5</span>
   <li>
    filters
    <ul>
     <li><a href="#dom-usbdevicerequestoptions-filters">dict-member for USBDeviceRequestOptions</a><span>, in §5</span>
     <li><a href="#dom-usbpermissiondescriptor-filters">dict-member for USBPermissionDescriptor</a><span>, in §7.2</span>
    </ul>
   <li><a href="#dom-usb-getdevices">getDevices()</a><span>, in §5</span>
   <li><a href="#get-url">Get URL</a><span>, in §4.2</span>
   <li><a href="#dom-usbdirection-in">"in"</a><span>, in §6.4</span>
   <li><a href="#dom-usbcontroltransferparameters-index">index</a><span>, in §6.1</span>
   <li><a href="#dom-usbrecipient-interface">"interface"</a><span>, in §6.1</span>
   <li><a href="#dom-usbalternateinterface-interfaceclass">interfaceClass</a><span>, in §6.3</span>
   <li><a href="#interface-descriptor">interface descriptor</a><span>, in §8</span>
   <li><a href="#dom-usbalternateinterface-interfacename">interfaceName</a><span>, in §6.3</span>
   <li><a href="#dom-usbinterface-interfacenumber">interfaceNumber</a><span>, in §6.3</span>
   <li><a href="#dom-usbalternateinterface-interfaceprotocol">interfaceProtocol</a><span>, in §6.3</span>
   <li><a href="#dom-usbconfiguration-interfaces">interfaces</a><span>, in §6.2</span>
   <li><a href="#dom-usbalternateinterface-interfacesubclass">interfaceSubclass</a><span>, in §6.3</span>
   <li><a href="#dom-usbendpointtype-interrupt">"interrupt"</a><span>, in §6.4</span>
   <li><a href="#interrupt-transfers">Interrupt transfers</a><span>, in §9.2</span>
   <li><a href="#in-transfers">IN transfers</a><span>, in §9.2</span>
   <li><a href="#is-not-a-valid-filter">is not a valid filter</a><span>, in §5</span>
   <li><a href="#dom-usbendpointtype-isochronous">"isochronous"</a><span>, in §6.4</span>
   <li><a href="#dom-usbdevice-isochronoustransferin">isochronousTransferIn(endpointNumber, packetLengths)</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-isochronoustransferout">isochronousTransferOut(endpointNumber, data, packetLengths)</a><span>, in §6</span>
   <li><a href="#isochronous-transfers">Isochronous transfers</a><span>, in §9.2</span>
   <li><a href="#landing-page">landing page</a><span>, in §4.1</span>
   <li><a href="#dom-usbdevice-manufacturername">manufacturerName</a><span>, in §6</span>
   <li><a href="#match-a-device-filter">match a device filter</a><span>, in §5</span>
   <li><a href="#matches-the-interface-filter">matches the interface filter</a><span>, in §5</span>
   <li><a href="#dom-usbtransferstatus-ok">"ok"</a><span>, in §6.1</span>
   <li><a href="#dom-usb-onconnect">onconnect</a><span>, in §5</span>
   <li><a href="#dom-usb-ondisconnect">ondisconnect</a><span>, in §5</span>
   <li><a href="#dom-usbdevice-open">open()</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-opened">opened</a><span>, in §6</span>
   <li><a href="#dom-usbrecipient-other">"other"</a><span>, in §6.1</span>
   <li><a href="#dom-usbdirection-out">"out"</a><span>, in §6.4</span>
   <li><a href="#out-transfers">OUT transfers</a><span>, in §9.2</span>
   <li>
    packets
    <ul>
     <li><a href="#dom-usbisochronousintransferresult-packets">attribute for USBIsochronousInTransferResult</a><span>, in §6.1</span>
     <li><a href="#dom-usbisochronousouttransferresult-packets">attribute for USBIsochronousOutTransferResult</a><span>, in §6.1</span>
    </ul>
   <li><a href="#dom-usbendpoint-packetsize">packetSize</a><span>, in §6.4</span>
   <li><a href="#platform-descriptor">Platform Descriptor</a><span>, in §8</span>
   <li>
    productId
    <ul>
     <li><a href="#dom-usbdevice-productid">attribute for USBDevice</a><span>, in §6</span>
     <li><a href="#dom-allowedusbdevice-productid">dict-member for AllowedUSBDevice</a><span>, in §7.2</span>
     <li><a href="#dom-usbdevicefilter-productid">dict-member for USBDeviceFilter</a><span>, in §5</span>
    </ul>
   <li><a href="#product-id">product ID</a><span>, in §8</span>
   <li><a href="#dom-usbdevice-productname">productName</a><span>, in §6</span>
   <li><a href="#dom-usbdevicefilter-protocolcode">protocolCode</a><span>, in §5</span>
   <li><a href="#dom-usbcontroltransferparameters-recipient">recipient</a><span>, in §6.1</span>
   <li><a href="#dom-usbdevice-releaseinterface">releaseInterface(interfaceNumber)</a><span>, in §6</span>
   <li><a href="#dom-usbcontroltransferparameters-request">request</a><span>, in §6.1</span>
   <li><a href="#dom-usb-requestdevice">requestDevice(options)</a><span>, in §5</span>
   <li><a href="#request-the-usb-permission">request the "usb" permission</a><span>, in §5</span>
   <li><a href="#dom-usbcontroltransferparameters-requesttype">requestType</a><span>, in §6.1</span>
   <li><a href="#dom-usbdevice-reset">reset()</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-selectalternateinterface">selectAlternateInterface(interfaceNumber, alternateSetting)</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-selectconfiguration">selectConfiguration(configurationValue)</a><span>, in §6</span>
   <li><a href="#serial-number">serial number</a><span>, in §8</span>
   <li>
    serialNumber
    <ul>
     <li><a href="#dom-usbdevice-serialnumber">attribute for USBDevice</a><span>, in §6</span>
     <li><a href="#dom-allowedusbdevice-serialnumber">dict-member for AllowedUSBDevice</a><span>, in §7.2</span>
     <li><a href="#dom-usbdevicefilter-serialnumber">dict-member for USBDeviceFilter</a><span>, in §5</span>
    </ul>
   <li><a href="#setup-packet">setup packet</a><span>, in §6.1</span>
   <li><a href="#setup-stage">setup stage</a><span>, in §6.1</span>
   <li><a href="#dom-usbtransferstatus-stall">"stall"</a><span>, in §6.1</span>
   <li><a href="#dom-usbrequesttype-standard">"standard"</a><span>, in §6.1</span>
   <li>
    status
    <ul>
     <li><a href="#dom-usbintransferresult-status">attribute for USBInTransferResult</a><span>, in §6.1</span>
     <li><a href="#dom-usbisochronousintransferpacket-status">attribute for USBIsochronousInTransferPacket</a><span>, in §6.1</span>
     <li><a href="#dom-usbisochronousouttransferpacket-status">attribute for USBIsochronousOutTransferPacket</a><span>, in §6.1</span>
     <li><a href="#dom-usbouttransferresult-status">attribute for USBOutTransferResult</a><span>, in §6.1</span>
    </ul>
   <li><a href="#status-stage">status stage</a><span>, in §6.1</span>
   <li><a href="#string-descriptor">string descriptor</a><span>, in §8</span>
   <li><a href="#dom-usbdevicefilter-subclasscode">subclassCode</a><span>, in §5</span>
   <li><a href="#dom-usbdevice-transferin">transferIn(endpointNumber, length)</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-transferout">transferOut(endpointNumber, data)</a><span>, in §6</span>
   <li><a href="#dom-usbendpoint-type">type</a><span>, in §6.4</span>
   <li><a href="#url-descriptor">URL Descriptor</a><span>, in §4.3</span>
   <li><a href="#dom-permissionname-usb">"usb"</a><span>, in §7.2</span>
   <li>
    usb
    <ul>
     <li><a href="#dom-navigator-usb">attribute for Navigator</a><span>, in §5</span>
     <li><a href="#dom-workernavigator-usb">attribute for WorkerNavigator</a><span>, in §5</span>
    </ul>
   <li><a href="#usb">USB</a><span>, in §5</span>
   <li><a href="#usbalternateinterface">USBAlternateInterface</a><span>, in §6.3</span>
   <li><a href="#dom-usbalternateinterface-usbalternateinterface">USBAlternateInterface(deviceInterface, alternateSetting)</a><span>, in §6.3</span>
   <li><a href="#usbconfiguration">USBConfiguration</a><span>, in §6.2</span>
   <li><a href="#dom-usbconfiguration-usbconfiguration">USBConfiguration(device, configurationValue)</a><span>, in §6.2</span>
   <li><a href="#usbconnectionevent">USBConnectionEvent</a><span>, in §5.1</span>
   <li><a href="#dictdef-usbconnectioneventinit">USBConnectionEventInit</a><span>, in §5.1</span>
   <li><a href="#dom-usbconnectionevent-usbconnectionevent">USBConnectionEvent(type, eventInitDict)</a><span>, in §5.1</span>
   <li><a href="#dictdef-usbcontroltransferparameters">USBControlTransferParameters</a><span>, in §6.1</span>
   <li><a href="#usb-device">USB device</a><span>, in §8</span>
   <li><a href="#usbdevice">USBDevice</a><span>, in §6</span>
   <li><a href="#dictdef-usbdevicefilter">USBDeviceFilter</a><span>, in §5</span>
   <li><a href="#dictdef-usbdevicerequestoptions">USBDeviceRequestOptions</a><span>, in §5</span>
   <li><a href="#enumdef-usbdirection">USBDirection</a><span>, in §6.4</span>
   <li><a href="#usbendpoint">USBEndpoint</a><span>, in §6.4</span>
   <li><a href="#dom-usbendpoint-usbendpoint">USBEndpoint(alternate, endpointNumber, direction)</a><span>, in §6.4</span>
   <li><a href="#enumdef-usbendpointtype">USBEndpointType</a><span>, in §6.4</span>
   <li><a href="#usbinterface">USBInterface</a><span>, in §6.3</span>
   <li><a href="#dom-usbinterface-usbinterface">USBInterface(configuration, interfaceNumber)</a><span>, in §6.3</span>
   <li><a href="#usbintransferresult">USBInTransferResult</a><span>, in §6.1</span>
   <li><a href="#dom-usbintransferresult-usbintransferresult">USBInTransferResult(status)</a><span>, in §6.1</span>
   <li><a href="#dom-usbintransferresult-usbintransferresult">USBInTransferResult(status, data)</a><span>, in §6.1</span>
   <li><a href="#usbisochronousintransferpacket">USBIsochronousInTransferPacket</a><span>, in §6.1</span>
   <li><a href="#dom-usbisochronousintransferpacket-usbisochronousintransferpacket">USBIsochronousInTransferPacket(status)</a><span>, in §6.1</span>
   <li><a href="#dom-usbisochronousintransferpacket-usbisochronousintransferpacket">USBIsochronousInTransferPacket(status, data)</a><span>, in §6.1</span>
   <li><a href="#usbisochronousintransferresult">USBIsochronousInTransferResult</a><span>, in §6.1</span>
   <li><a href="#dom-usbisochronousintransferresult-usbisochronousintransferresult">USBIsochronousInTransferResult(packets)</a><span>, in §6.1</span>
   <li><a href="#dom-usbisochronousintransferresult-usbisochronousintransferresult">USBIsochronousInTransferResult(packets, data)</a><span>, in §6.1</span>
   <li><a href="#usbisochronousouttransferpacket">USBIsochronousOutTransferPacket</a><span>, in §6.1</span>
   <li><a href="#dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket">USBIsochronousOutTransferPacket(status)</a><span>, in §6.1</span>
   <li><a href="#dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket">USBIsochronousOutTransferPacket(status, bytesWritten)</a><span>, in §6.1</span>
   <li><a href="#usbisochronousouttransferresult">USBIsochronousOutTransferResult</a><span>, in §6.1</span>
   <li><a href="#dom-usbisochronousouttransferresult-usbisochronousouttransferresult">USBIsochronousOutTransferResult(packets)</a><span>, in §6.1</span>
   <li><a href="#usbouttransferresult">USBOutTransferResult</a><span>, in §6.1</span>
   <li><a href="#dom-usbouttransferresult-usbouttransferresult">USBOutTransferResult(status)</a><span>, in §6.1</span>
   <li><a href="#dom-usbouttransferresult-usbouttransferresult">USBOutTransferResult(status, bytesWritten)</a><span>, in §6.1</span>
   <li><a href="#dictdef-usbpermissiondescriptor">USBPermissionDescriptor</a><span>, in §7.2</span>
   <li><a href="#usbpermissionresult">USBPermissionResult</a><span>, in §7.2</span>
   <li><a href="#dictdef-usbpermissionstorage">USBPermissionStorage</a><span>, in §7.2</span>
   <li><a href="#enumdef-usbrecipient">USBRecipient</a><span>, in §6.1</span>
   <li><a href="#enumdef-usbrequesttype">USBRequestType</a><span>, in §6.1</span>
   <li><a href="#enumdef-usbtransferstatus">USBTransferStatus</a><span>, in §6.1</span>
   <li><a href="#dom-usbdevice-usbversionmajor">usbVersionMajor</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-usbversionminor">usbVersionMinor</a><span>, in §6</span>
   <li><a href="#dom-usbdevice-usbversionsubminor">usbVersionSubminor</a><span>, in §6</span>
   <li><a href="#dom-usbcontroltransferparameters-value">value</a><span>, in §6.1</span>
   <li><a href="#dom-usbrequesttype-vendor">"vendor"</a><span>, in §6.1</span>
   <li>
    vendorId
    <ul>
     <li><a href="#dom-usbdevice-vendorid">attribute for USBDevice</a><span>, in §6</span>
     <li><a href="#dom-allowedusbdevice-vendorid">dict-member for AllowedUSBDevice</a><span>, in §7.2</span>
     <li><a href="#dom-usbdevicefilter-vendorid">dict-member for USBDeviceFilter</a><span>, in §5</span>
    </ul>
   <li><a href="#vendor-id">vendor ID</a><span>, in §8</span>
   <li><a href="#webusb-platform-capability-descriptor">WebUSB Platform Capability Descriptor</a><span>, in §4</span>
  </ul>
  <aside class="dfn-panel" data-for="term-for-event">
   <a href="https://dom.spec.whatwg.org/#event">https://dom.spec.whatwg.org/#event</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-event">5.1. Events</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dictdef-eventinit">
   <a href="https://dom.spec.whatwg.org/#dictdef-eventinit">https://dom.spec.whatwg.org/#dictdef-eventinit</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-eventinit">5.1. Events</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-eventtarget">
   <a href="https://dom.spec.whatwg.org/#eventtarget">https://dom.spec.whatwg.org/#eventtarget</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventtarget">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-sec-array-objects">
   <a href="https://tc39.github.io/ecma262/#sec-array-objects">https://tc39.github.io/ecma262/#sec-array-objects</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-sec-array-objects">5. Device Enumeration</a>
    <li><a href="#ref-for-sec-array-objects①">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-sec-promise-objects">
   <a href="https://tc39.github.io/ecma262/#sec-promise-objects">https://tc39.github.io/ecma262/#sec-promise-objects</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-sec-promise-objects">5. Device Enumeration</a> <a href="#ref-for-sec-promise-objects①">(2)</a> <a href="#ref-for-sec-promise-objects②">(3)</a>
    <li><a href="#ref-for-sec-promise-objects③">6. Device Usage</a> <a href="#ref-for-sec-promise-objects④">(2)</a> <a href="#ref-for-sec-promise-objects⑤">(3)</a> <a href="#ref-for-sec-promise-objects⑥">(4)</a> <a href="#ref-for-sec-promise-objects⑦">(5)</a> <a href="#ref-for-sec-promise-objects⑧">(6)</a> <a href="#ref-for-sec-promise-objects⑨">(7)</a> <a href="#ref-for-sec-promise-objects①⓪">(8)</a> <a href="#ref-for-sec-promise-objects①①">(9)</a> <a href="#ref-for-sec-promise-objects①②">(10)</a> <a href="#ref-for-sec-promise-objects①③">(11)</a> <a href="#ref-for-sec-promise-objects①④">(12)</a> <a href="#ref-for-sec-promise-objects①⑤">(13)</a> <a href="#ref-for-sec-promise-objects①⑥">(14)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-sec-native-error-types-used-in-this-standard-typeerror">
   <a href="https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror">https://tc39.github.io/ecma262/#sec-native-error-types-used-in-this-standard-typeerror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-sec-native-error-types-used-in-this-standard-typeerror">5. Device Enumeration</a>
    <li><a href="#ref-for-sec-native-error-types-used-in-this-standard-typeerror①">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-default-allowlist">
   <a href="https://wicg.github.io/feature-policy/#default-allowlist">https://wicg.github.io/feature-policy/#default-allowlist</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-default-allowlist">7.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-feature">
   <a href="https://wicg.github.io/feature-policy/#feature">https://wicg.github.io/feature-policy/#feature</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-feature">7.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-feature-name">
   <a href="https://wicg.github.io/feature-policy/#feature-name">https://wicg.github.io/feature-policy/#feature-name</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-feature-name">7.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-eventhandler">
   <a href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler">https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-eventhandler">5. Device Enumeration</a> <a href="#ref-for-eventhandler①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-navigator">
   <a href="https://html.spec.whatwg.org/multipage/system-state.html#navigator">https://html.spec.whatwg.org/multipage/system-state.html#navigator</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-navigator">5. Device Enumeration</a>
    <li><a href="#ref-for-navigator①">7.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-workernavigator">
   <a href="https://html.spec.whatwg.org/multipage/workers.html#workernavigator">https://html.spec.whatwg.org/multipage/workers.html#workernavigator</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-workernavigator">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-in-parallel">
   <a href="https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel">https://html.spec.whatwg.org/multipage/infrastructure.html#in-parallel</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-in-parallel">5. Device Enumeration</a> <a href="#ref-for-in-parallel①">(2)</a>
    <li><a href="#ref-for-in-parallel②">6. Device Usage</a> <a href="#ref-for-in-parallel③">(2)</a> <a href="#ref-for-in-parallel④">(3)</a> <a href="#ref-for-in-parallel⑤">(4)</a> <a href="#ref-for-in-parallel⑥">(5)</a> <a href="#ref-for-in-parallel⑦">(6)</a> <a href="#ref-for-in-parallel⑧">(7)</a> <a href="#ref-for-in-parallel⑨">(8)</a> <a href="#ref-for-in-parallel①⓪">(9)</a> <a href="#ref-for-in-parallel①①">(10)</a> <a href="#ref-for-in-parallel①②">(11)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-triggered-by-user-activation">
   <a href="https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation">https://html.spec.whatwg.org/multipage/interaction.html#triggered-by-user-activation</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-triggered-by-user-activation">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-permissionstate-prompt">
   <a href="https://w3c.github.io/permissions/#dom-permissionstate-prompt">https://w3c.github.io/permissions/#dom-permissionstate-prompt</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-permissionstate-prompt">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dictdef-permissiondescriptor">
   <a href="https://w3c.github.io/permissions/#dictdef-permissiondescriptor">https://w3c.github.io/permissions/#dictdef-permissiondescriptor</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-permissiondescriptor">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-permissionstatus">
   <a href="https://w3c.github.io/permissions/#permissionstatus">https://w3c.github.io/permissions/#permissionstatus</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-permissionstatus">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-extra-permission-data-type">
   <a href="https://w3c.github.io/permissions/#extra-permission-data-type">https://w3c.github.io/permissions/#extra-permission-data-type</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-extra-permission-data-type">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-permission-descriptor-type">
   <a href="https://w3c.github.io/permissions/#permission-descriptor-type">https://w3c.github.io/permissions/#permission-descriptor-type</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-permission-descriptor-type">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-permission-query-algorithm">
   <a href="https://w3c.github.io/permissions/#permission-query-algorithm">https://w3c.github.io/permissions/#permission-query-algorithm</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-permission-query-algorithm">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-permission-result-type">
   <a href="https://w3c.github.io/permissions/#permission-result-type">https://w3c.github.io/permissions/#permission-result-type</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-permission-result-type">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-powerful-feature">
   <a href="https://w3c.github.io/permissions/#powerful-feature">https://w3c.github.io/permissions/#powerful-feature</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-powerful-feature">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-request-permission-to-use">
   <a href="https://w3c.github.io/permissions/#request-permission-to-use">https://w3c.github.io/permissions/#request-permission-to-use</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-request-permission-to-use">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-dom-permissionstatus-state">
   <a href="https://w3c.github.io/permissions/#dom-permissionstatus-state">https://w3c.github.io/permissions/#dom-permissionstatus-state</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-permissionstatus-state">5. Device Enumeration</a>
    <li><a href="#ref-for-dom-permissionstatus-state①">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-permission-request-algorithm">
   <a href="https://wicg.github.io/permissions-request/#permission-request-algorithm">https://wicg.github.io/permissions-request/#permission-request-algorithm</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-permission-request-algorithm">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-reject-promise">
   <a href="https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise">https://www.w3.org/2001/tag/doc/promises-guide/#reject-promise</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-reject-promise">5. Device Enumeration</a> <a href="#ref-for-reject-promise①">(2)</a>
    <li><a href="#ref-for-reject-promise②">6. Device Usage</a> <a href="#ref-for-reject-promise③">(2)</a> <a href="#ref-for-reject-promise④">(3)</a> <a href="#ref-for-reject-promise⑤">(4)</a> <a href="#ref-for-reject-promise⑥">(5)</a> <a href="#ref-for-reject-promise⑦">(6)</a> <a href="#ref-for-reject-promise⑧">(7)</a> <a href="#ref-for-reject-promise⑨">(8)</a> <a href="#ref-for-reject-promise①⓪">(9)</a> <a href="#ref-for-reject-promise①①">(10)</a> <a href="#ref-for-reject-promise①②">(11)</a> <a href="#ref-for-reject-promise①③">(12)</a> <a href="#ref-for-reject-promise①④">(13)</a> <a href="#ref-for-reject-promise①⑤">(14)</a> <a href="#ref-for-reject-promise①⑥">(15)</a> <a href="#ref-for-reject-promise①⑦">(16)</a> <a href="#ref-for-reject-promise①⑧">(17)</a> <a href="#ref-for-reject-promise①⑨">(18)</a> <a href="#ref-for-reject-promise②⓪">(19)</a> <a href="#ref-for-reject-promise②①">(20)</a> <a href="#ref-for-reject-promise②②">(21)</a> <a href="#ref-for-reject-promise②③">(22)</a> <a href="#ref-for-reject-promise②④">(23)</a> <a href="#ref-for-reject-promise②⑤">(24)</a> <a href="#ref-for-reject-promise②⑥">(25)</a> <a href="#ref-for-reject-promise②⑦">(26)</a> <a href="#ref-for-reject-promise②⑧">(27)</a> <a href="#ref-for-reject-promise②⑨">(28)</a> <a href="#ref-for-reject-promise③⓪">(29)</a> <a href="#ref-for-reject-promise③①">(30)</a> <a href="#ref-for-reject-promise③②">(31)</a> <a href="#ref-for-reject-promise③③">(32)</a> <a href="#ref-for-reject-promise③④">(33)</a> <a href="#ref-for-reject-promise③⑤">(34)</a> <a href="#ref-for-reject-promise③⑥">(35)</a> <a href="#ref-for-reject-promise③⑦">(36)</a> <a href="#ref-for-reject-promise③⑧">(37)</a> <a href="#ref-for-reject-promise③⑨">(38)</a> <a href="#ref-for-reject-promise④⓪">(39)</a> <a href="#ref-for-reject-promise④①">(40)</a> <a href="#ref-for-reject-promise④②">(41)</a> <a href="#ref-for-reject-promise④③">(42)</a> <a href="#ref-for-reject-promise④④">(43)</a> <a href="#ref-for-reject-promise④⑤">(44)</a> <a href="#ref-for-reject-promise④⑥">(45)</a> <a href="#ref-for-reject-promise④⑦">(46)</a> <a href="#ref-for-reject-promise④⑧">(47)</a> <a href="#ref-for-reject-promise④⑨">(48)</a> <a href="#ref-for-reject-promise⑤⓪">(49)</a> <a href="#ref-for-reject-promise⑤①">(50)</a> <a href="#ref-for-reject-promise⑤②">(51)</a> <a href="#ref-for-reject-promise⑤③">(52)</a> <a href="#ref-for-reject-promise⑤④">(53)</a> <a href="#ref-for-reject-promise⑤⑤">(54)</a> <a href="#ref-for-reject-promise⑤⑥">(55)</a>
    <li><a href="#ref-for-reject-promise⑤⑦">6.1. Transfers</a> <a href="#ref-for-reject-promise⑤⑧">(2)</a> <a href="#ref-for-reject-promise⑤⑨">(3)</a> <a href="#ref-for-reject-promise⑥⓪">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-upon-fulfillment">
   <a href="https://www.w3.org/2001/tag/doc/promises-guide/#upon-fulfillment">https://www.w3.org/2001/tag/doc/promises-guide/#upon-fulfillment</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-upon-fulfillment">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-aborterror">
   <a href="https://heycam.github.io/webidl/#aborterror">https://heycam.github.io/webidl/#aborterror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-aborterror">6. Device Usage</a> <a href="#ref-for-aborterror①">(2)</a> <a href="#ref-for-aborterror②">(3)</a> <a href="#ref-for-aborterror③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-ArrayBuffer">
   <a href="https://heycam.github.io/webidl/#idl-ArrayBuffer">https://heycam.github.io/webidl/#idl-ArrayBuffer</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-ArrayBuffer">6. Device Usage</a> <a href="#ref-for-idl-ArrayBuffer①">(2)</a> <a href="#ref-for-idl-ArrayBuffer②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-BufferSource">
   <a href="https://heycam.github.io/webidl/#BufferSource">https://heycam.github.io/webidl/#BufferSource</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-BufferSource">6. Device Usage</a> <a href="#ref-for-BufferSource①">(2)</a> <a href="#ref-for-BufferSource②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-DOMString">
   <a href="https://heycam.github.io/webidl/#idl-DOMString">https://heycam.github.io/webidl/#idl-DOMString</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-DOMString">5. Device Enumeration</a>
    <li><a href="#ref-for-idl-DOMString①">5.1. Events</a>
    <li><a href="#ref-for-idl-DOMString②">6. Device Usage</a> <a href="#ref-for-idl-DOMString③">(2)</a> <a href="#ref-for-idl-DOMString④">(3)</a>
    <li><a href="#ref-for-idl-DOMString⑤">6.2. Configurations</a>
    <li><a href="#ref-for-idl-DOMString⑥">6.3. Interfaces</a>
    <li><a href="#ref-for-idl-DOMString⑦">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-DataView">
   <a href="https://heycam.github.io/webidl/#idl-DataView">https://heycam.github.io/webidl/#idl-DataView</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-DataView">6. Device Usage</a> <a href="#ref-for-idl-DataView①">(2)</a> <a href="#ref-for-idl-DataView②">(3)</a> <a href="#ref-for-idl-DataView③">(4)</a>
    <li><a href="#ref-for-idl-DataView④">6.1. Transfers</a> <a href="#ref-for-idl-DataView⑤">(2)</a> <a href="#ref-for-idl-DataView⑥">(3)</a> <a href="#ref-for-idl-DataView⑦">(4)</a> <a href="#ref-for-idl-DataView⑧">(5)</a> <a href="#ref-for-idl-DataView⑨">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-Exposed">
   <a href="https://heycam.github.io/webidl/#Exposed">https://heycam.github.io/webidl/#Exposed</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-Exposed">5. Device Enumeration</a> <a href="#ref-for-Exposed①">(2)</a> <a href="#ref-for-Exposed②">(3)</a> <a href="#ref-for-Exposed③">(4)</a>
    <li><a href="#ref-for-Exposed④">5.1. Events</a>
    <li><a href="#ref-for-Exposed⑤">6. Device Usage</a>
    <li><a href="#ref-for-Exposed⑥">6.1. Transfers</a> <a href="#ref-for-Exposed⑦">(2)</a> <a href="#ref-for-Exposed⑧">(3)</a> <a href="#ref-for-Exposed⑨">(4)</a> <a href="#ref-for-Exposed①⓪">(5)</a> <a href="#ref-for-Exposed①①">(6)</a>
    <li><a href="#ref-for-Exposed①②">6.2. Configurations</a>
    <li><a href="#ref-for-Exposed①③">6.3. Interfaces</a> <a href="#ref-for-Exposed①④">(2)</a>
    <li><a href="#ref-for-Exposed①⑤">6.4. Endpoints</a>
    <li><a href="#ref-for-Exposed①⑥">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-frozen-array">
   <a href="https://heycam.github.io/webidl/#idl-frozen-array">https://heycam.github.io/webidl/#idl-frozen-array</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-frozen-array">5. Device Enumeration</a> <a href="#ref-for-idl-frozen-array①">(2)</a>
    <li><a href="#ref-for-idl-frozen-array②">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-invalidaccesserror">
   <a href="https://heycam.github.io/webidl/#invalidaccesserror">https://heycam.github.io/webidl/#invalidaccesserror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-invalidaccesserror">6. Device Usage</a> <a href="#ref-for-invalidaccesserror①">(2)</a> <a href="#ref-for-invalidaccesserror②">(3)</a> <a href="#ref-for-invalidaccesserror③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-invalidstateerror">
   <a href="https://heycam.github.io/webidl/#invalidstateerror">https://heycam.github.io/webidl/#invalidstateerror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-invalidstateerror">6. Device Usage</a> <a href="#ref-for-invalidstateerror①">(2)</a> <a href="#ref-for-invalidstateerror②">(3)</a> <a href="#ref-for-invalidstateerror③">(4)</a> <a href="#ref-for-invalidstateerror④">(5)</a> <a href="#ref-for-invalidstateerror⑤">(6)</a> <a href="#ref-for-invalidstateerror⑥">(7)</a> <a href="#ref-for-invalidstateerror⑦">(8)</a> <a href="#ref-for-invalidstateerror⑧">(9)</a> <a href="#ref-for-invalidstateerror⑨">(10)</a> <a href="#ref-for-invalidstateerror①⓪">(11)</a> <a href="#ref-for-invalidstateerror①①">(12)</a>
    <li><a href="#ref-for-invalidstateerror①②">6.1. Transfers</a> <a href="#ref-for-invalidstateerror①③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-networkerror">
   <a href="https://heycam.github.io/webidl/#networkerror">https://heycam.github.io/webidl/#networkerror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-networkerror">6. Device Usage</a> <a href="#ref-for-networkerror①">(2)</a> <a href="#ref-for-networkerror②">(3)</a> <a href="#ref-for-networkerror③">(4)</a> <a href="#ref-for-networkerror④">(5)</a> <a href="#ref-for-networkerror⑤">(6)</a> <a href="#ref-for-networkerror⑥">(7)</a> <a href="#ref-for-networkerror⑦">(8)</a> <a href="#ref-for-networkerror⑧">(9)</a> <a href="#ref-for-networkerror⑨">(10)</a> <a href="#ref-for-networkerror①⓪">(11)</a> <a href="#ref-for-networkerror①①">(12)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-notfounderror">
   <a href="https://heycam.github.io/webidl/#notfounderror">https://heycam.github.io/webidl/#notfounderror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-notfounderror">5. Device Enumeration</a>
    <li><a href="#ref-for-notfounderror①">6. Device Usage</a> <a href="#ref-for-notfounderror②">(2)</a> <a href="#ref-for-notfounderror③">(3)</a> <a href="#ref-for-notfounderror④">(4)</a> <a href="#ref-for-notfounderror⑤">(5)</a> <a href="#ref-for-notfounderror⑥">(6)</a> <a href="#ref-for-notfounderror⑦">(7)</a> <a href="#ref-for-notfounderror⑧">(8)</a> <a href="#ref-for-notfounderror⑨">(9)</a> <a href="#ref-for-notfounderror①⓪">(10)</a> <a href="#ref-for-notfounderror①①">(11)</a> <a href="#ref-for-notfounderror①②">(12)</a> <a href="#ref-for-notfounderror①③">(13)</a> <a href="#ref-for-notfounderror①④">(14)</a> <a href="#ref-for-notfounderror①⑤">(15)</a> <a href="#ref-for-notfounderror①⑥">(16)</a> <a href="#ref-for-notfounderror①⑦">(17)</a> <a href="#ref-for-notfounderror①⑧">(18)</a> <a href="#ref-for-notfounderror①⑨">(19)</a> <a href="#ref-for-notfounderror②⓪">(20)</a> <a href="#ref-for-notfounderror②①">(21)</a> <a href="#ref-for-notfounderror②②">(22)</a>
    <li><a href="#ref-for-notfounderror②③">6.1. Transfers</a> <a href="#ref-for-notfounderror②④">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-SameObject">
   <a href="https://heycam.github.io/webidl/#SameObject">https://heycam.github.io/webidl/#SameObject</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-SameObject">5. Device Enumeration</a> <a href="#ref-for-SameObject①">(2)</a>
    <li><a href="#ref-for-SameObject②">5.1. Events</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-SecureContext">
   <a href="https://heycam.github.io/webidl/#SecureContext">https://heycam.github.io/webidl/#SecureContext</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-SecureContext">5. Device Enumeration</a> <a href="#ref-for-SecureContext①">(2)</a> <a href="#ref-for-SecureContext②">(3)</a>
    <li><a href="#ref-for-SecureContext③">5.1. Events</a>
    <li><a href="#ref-for-SecureContext④">6. Device Usage</a>
    <li><a href="#ref-for-SecureContext⑤">6.1. Transfers</a> <a href="#ref-for-SecureContext⑥">(2)</a> <a href="#ref-for-SecureContext⑦">(3)</a> <a href="#ref-for-SecureContext⑧">(4)</a> <a href="#ref-for-SecureContext⑨">(5)</a> <a href="#ref-for-SecureContext①⓪">(6)</a>
    <li><a href="#ref-for-SecureContext①①">6.2. Configurations</a>
    <li><a href="#ref-for-SecureContext①②">6.3. Interfaces</a> <a href="#ref-for-SecureContext①③">(2)</a>
    <li><a href="#ref-for-SecureContext①④">6.4. Endpoints</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-securityerror">
   <a href="https://heycam.github.io/webidl/#securityerror">https://heycam.github.io/webidl/#securityerror</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-securityerror">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-boolean">
   <a href="https://heycam.github.io/webidl/#idl-boolean">https://heycam.github.io/webidl/#idl-boolean</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-boolean">6. Device Usage</a>
    <li><a href="#ref-for-idl-boolean①">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-octet">
   <a href="https://heycam.github.io/webidl/#idl-octet">https://heycam.github.io/webidl/#idl-octet</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-octet">5. Device Enumeration</a> <a href="#ref-for-idl-octet①">(2)</a> <a href="#ref-for-idl-octet②">(3)</a>
    <li><a href="#ref-for-idl-octet③">6. Device Usage</a> <a href="#ref-for-idl-octet④">(2)</a> <a href="#ref-for-idl-octet⑤">(3)</a> <a href="#ref-for-idl-octet⑥">(4)</a> <a href="#ref-for-idl-octet⑦">(5)</a> <a href="#ref-for-idl-octet⑧">(6)</a> <a href="#ref-for-idl-octet⑨">(7)</a> <a href="#ref-for-idl-octet①⓪">(8)</a> <a href="#ref-for-idl-octet①①">(9)</a> <a href="#ref-for-idl-octet①②">(10)</a> <a href="#ref-for-idl-octet①③">(11)</a> <a href="#ref-for-idl-octet①④">(12)</a> <a href="#ref-for-idl-octet①⑤">(13)</a> <a href="#ref-for-idl-octet①⑥">(14)</a> <a href="#ref-for-idl-octet①⑦">(15)</a> <a href="#ref-for-idl-octet①⑧">(16)</a> <a href="#ref-for-idl-octet①⑨">(17)</a> <a href="#ref-for-idl-octet②⓪">(18)</a> <a href="#ref-for-idl-octet②①">(19)</a>
    <li><a href="#ref-for-idl-octet②②">6.1. Transfers</a>
    <li><a href="#ref-for-idl-octet②③">6.2. Configurations</a> <a href="#ref-for-idl-octet②④">(2)</a>
    <li><a href="#ref-for-idl-octet②⑤">6.3. Interfaces</a> <a href="#ref-for-idl-octet②⑥">(2)</a> <a href="#ref-for-idl-octet②⑦">(3)</a> <a href="#ref-for-idl-octet②⑧">(4)</a> <a href="#ref-for-idl-octet②⑨">(5)</a> <a href="#ref-for-idl-octet③⓪">(6)</a> <a href="#ref-for-idl-octet③①">(7)</a>
    <li><a href="#ref-for-idl-octet③②">6.4. Endpoints</a> <a href="#ref-for-idl-octet③③">(2)</a>
    <li><a href="#ref-for-idl-octet③④">7.2. Permission API</a> <a href="#ref-for-idl-octet③⑤">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-unsigned-long">
   <a href="https://heycam.github.io/webidl/#idl-unsigned-long">https://heycam.github.io/webidl/#idl-unsigned-long</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-unsigned-long">6. Device Usage</a> <a href="#ref-for-idl-unsigned-long①">(2)</a> <a href="#ref-for-idl-unsigned-long②">(3)</a>
    <li><a href="#ref-for-idl-unsigned-long③">6.1. Transfers</a> <a href="#ref-for-idl-unsigned-long④">(2)</a> <a href="#ref-for-idl-unsigned-long⑤">(3)</a> <a href="#ref-for-idl-unsigned-long⑥">(4)</a>
    <li><a href="#ref-for-idl-unsigned-long⑦">6.4. Endpoints</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="term-for-idl-unsigned-short">
   <a href="https://heycam.github.io/webidl/#idl-unsigned-short">https://heycam.github.io/webidl/#idl-unsigned-short</a><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-idl-unsigned-short">5. Device Enumeration</a> <a href="#ref-for-idl-unsigned-short①">(2)</a>
    <li><a href="#ref-for-idl-unsigned-short②">6. Device Usage</a> <a href="#ref-for-idl-unsigned-short③">(2)</a> <a href="#ref-for-idl-unsigned-short④">(3)</a>
    <li><a href="#ref-for-idl-unsigned-short⑤">6.1. Transfers</a> <a href="#ref-for-idl-unsigned-short⑥">(2)</a>
   </ul>
  </aside>
  <h3 class="no-num no-ref heading settled" id="index-defined-elsewhere"><span class="content">Terms defined by reference</span><a class="self-link" href="#index-defined-elsewhere"></a></h3>
  <ul class="index">
   <li>
    <a data-link-type="biblio">[DOM]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-event" style="color:initial">Event</span>
     <li><span class="dfn-paneled" id="term-for-dictdef-eventinit" style="color:initial">EventInit</span>
     <li><span class="dfn-paneled" id="term-for-eventtarget" style="color:initial">EventTarget</span>
    </ul>
   <li>
    <a data-link-type="biblio">[ECMAScript]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-sec-array-objects" style="color:initial">Array</span>
     <li><span class="dfn-paneled" id="term-for-sec-promise-objects" style="color:initial">Promise</span>
     <li><span class="dfn-paneled" id="term-for-sec-native-error-types-used-in-this-standard-typeerror" style="color:initial">TypeError</span>
    </ul>
   <li>
    <a data-link-type="biblio">[feature policy]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-default-allowlist" style="color:initial">default allowlist</span>
     <li><span class="dfn-paneled" id="term-for-feature" style="color:initial">feature</span>
     <li><span class="dfn-paneled" id="term-for-feature-name" style="color:initial">feature name</span>
    </ul>
   <li>
    <a data-link-type="biblio">[HTML]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-eventhandler" style="color:initial">EventHandler</span>
     <li><span class="dfn-paneled" id="term-for-navigator" style="color:initial">Navigator</span>
     <li><span class="dfn-paneled" id="term-for-workernavigator" style="color:initial">WorkerNavigator</span>
     <li><span class="dfn-paneled" id="term-for-in-parallel" style="color:initial">in parallel</span>
     <li><span class="dfn-paneled" id="term-for-triggered-by-user-activation" style="color:initial">triggered by user activation</span>
    </ul>
   <li>
    <a data-link-type="biblio">[permissions]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-dom-permissionstate-prompt" style="color:initial">"prompt"</span>
     <li><span class="dfn-paneled" id="term-for-dictdef-permissiondescriptor" style="color:initial">PermissionDescriptor</span>
     <li><span class="dfn-paneled" id="term-for-permissionstatus" style="color:initial">PermissionStatus</span>
     <li><span class="dfn-paneled" id="term-for-extra-permission-data-type" style="color:initial">extra permission data type</span>
     <li><span class="dfn-paneled" id="term-for-permission-descriptor-type" style="color:initial">permission descriptor type</span>
     <li><span class="dfn-paneled" id="term-for-permission-query-algorithm" style="color:initial">permission query algorithm</span>
     <li><span class="dfn-paneled" id="term-for-permission-result-type" style="color:initial">permission result type</span>
     <li><span class="dfn-paneled" id="term-for-powerful-feature" style="color:initial">powerful feature</span>
     <li><span class="dfn-paneled" id="term-for-request-permission-to-use" style="color:initial">request permission to use</span>
     <li><span class="dfn-paneled" id="term-for-dom-permissionstatus-state" style="color:initial">state</span>
    </ul>
   <li>
    <a data-link-type="biblio">[PERMISSIONS-REQUEST]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-permission-request-algorithm" style="color:initial">permission request algorithm</span>
    </ul>
   <li>
    <a data-link-type="biblio">[promises-guide]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-reject-promise" style="color:initial">reject</span>
     <li><span class="dfn-paneled" id="term-for-upon-fulfillment" style="color:initial">upon fulfillment</span>
    </ul>
   <li>
    <a data-link-type="biblio">[WebIDL]</a> defines the following terms:
    <ul>
     <li><span class="dfn-paneled" id="term-for-aborterror" style="color:initial">AbortError</span>
     <li><span class="dfn-paneled" id="term-for-idl-ArrayBuffer" style="color:initial">ArrayBuffer</span>
     <li><span class="dfn-paneled" id="term-for-BufferSource" style="color:initial">BufferSource</span>
     <li><span class="dfn-paneled" id="term-for-idl-DOMString" style="color:initial">DOMString</span>
     <li><span class="dfn-paneled" id="term-for-idl-DataView" style="color:initial">DataView</span>
     <li><span class="dfn-paneled" id="term-for-Exposed" style="color:initial">Exposed</span>
     <li><span class="dfn-paneled" id="term-for-idl-frozen-array" style="color:initial">FrozenArray</span>
     <li><span class="dfn-paneled" id="term-for-invalidaccesserror" style="color:initial">InvalidAccessError</span>
     <li><span class="dfn-paneled" id="term-for-invalidstateerror" style="color:initial">InvalidStateError</span>
     <li><span class="dfn-paneled" id="term-for-networkerror" style="color:initial">NetworkError</span>
     <li><span class="dfn-paneled" id="term-for-notfounderror" style="color:initial">NotFoundError</span>
     <li><span class="dfn-paneled" id="term-for-SameObject" style="color:initial">SameObject</span>
     <li><span class="dfn-paneled" id="term-for-SecureContext" style="color:initial">SecureContext</span>
     <li><span class="dfn-paneled" id="term-for-securityerror" style="color:initial">SecurityError</span>
     <li><span class="dfn-paneled" id="term-for-idl-boolean" style="color:initial">boolean</span>
     <li><span class="dfn-paneled" id="term-for-idl-octet" style="color:initial">octet</span>
     <li><span class="dfn-paneled" id="term-for-idl-unsigned-long" style="color:initial">unsigned long</span>
     <li><span class="dfn-paneled" id="term-for-idl-unsigned-short" style="color:initial">unsigned short</span>
    </ul>
  </ul>
  <h2 class="no-num no-ref heading settled" id="references"><span class="content">References</span><a class="self-link" href="#references"></a></h2>
  <h3 class="no-num no-ref heading settled" id="normative"><span class="content">Normative References</span><a class="self-link" href="#normative"></a></h3>
  <dl>
   <dt id="biblio-dom">[DOM]
   <dd>Anne van Kesteren. <a href="https://dom.spec.whatwg.org/">DOM Standard</a>. Living Standard. URL: <a href="https://dom.spec.whatwg.org/">https://dom.spec.whatwg.org/</a>
   <dt id="biblio-ecmascript">[ECMAScript]
   <dd><a href="https://tc39.github.io/ecma262/">ECMAScript Language Specification</a>. URL: <a href="https://tc39.github.io/ecma262/">https://tc39.github.io/ecma262/</a>
   <dt id="biblio-html">[HTML]
   <dd>Anne van Kesteren; et al. <a href="https://html.spec.whatwg.org/multipage/">HTML Standard</a>. Living Standard. URL: <a href="https://html.spec.whatwg.org/multipage/">https://html.spec.whatwg.org/multipage/</a>
   <dt id="biblio-permissions">[PERMISSIONS]
   <dd>Mounir Lamouri; Marcos Caceres; Jeffrey Yasskin. <a href="https://www.w3.org/TR/permissions/">Permissions</a>. 25 September 2017. WD. URL: <a href="https://www.w3.org/TR/permissions/">https://www.w3.org/TR/permissions/</a>
   <dt id="biblio-permissions-request">[PERMISSIONS-REQUEST]
   <dd><a href="https://wicg.github.io/permissions-request/">Requesting Permissions</a>. Living Standard. URL: <a href="https://wicg.github.io/permissions-request/">https://wicg.github.io/permissions-request/</a>
   <dt id="biblio-promises-guide">[PROMISES-GUIDE]
   <dd>Domenic Denicola. <a href="https://www.w3.org/2001/tag/doc/promises-guide">Writing Promise-Using Specifications</a>. 9 November 2018. TAG Finding. URL: <a href="https://www.w3.org/2001/tag/doc/promises-guide">https://www.w3.org/2001/tag/doc/promises-guide</a>
   <dt id="biblio-rfc2119">[RFC2119]
   <dd>S. Bradner. <a href="https://tools.ietf.org/html/rfc2119">Key words for use in RFCs to Indicate Requirement Levels</a>. March 1997. Best Current Practice. URL: <a href="https://tools.ietf.org/html/rfc2119">https://tools.ietf.org/html/rfc2119</a>
   <dt id="biblio-usb31">[USB31]
   <dd><a href="http://www.usb.org/developers/docs/">Universal Serial Bus 3.1 Specification</a>. 26 July 2013. URL: <a href="http://www.usb.org/developers/docs/">http://www.usb.org/developers/docs/</a>
   <dt id="biblio-webidl">[WebIDL]
   <dd>Boris Zbarsky. <a href="https://heycam.github.io/webidl/">Web IDL</a>. 15 December 2016. ED. URL: <a href="https://heycam.github.io/webidl/">https://heycam.github.io/webidl/</a>
  </dl>
  <h3 class="no-num no-ref heading settled" id="informative"><span class="content">Informative References</span><a class="self-link" href="#informative"></a></h3>
  <dl>
   <dt id="biblio-cors">[CORS]
   <dd>Anne van Kesteren. <a href="https://www.w3.org/TR/cors/">Cross-Origin Resource Sharing</a>. 16 January 2014. REC. URL: <a href="https://www.w3.org/TR/cors/">https://www.w3.org/TR/cors/</a>
   <dt id="biblio-powerful-features">[POWERFUL-FEATURES]
   <dd>Mike West. <a href="https://www.w3.org/TR/secure-contexts/">Secure Contexts</a>. 15 September 2016. CR. URL: <a href="https://www.w3.org/TR/secure-contexts/">https://www.w3.org/TR/secure-contexts/</a>
   <dt id="biblio-rfc4122">[RFC4122]
   <dd><a href="https://tools.ietf.org/html/rfc4122">A Universally Unique IDentifier (UUID) URN Namespace</a>. July 2005. URL: <a href="https://tools.ietf.org/html/rfc4122">https://tools.ietf.org/html/rfc4122</a>
  </dl>
  <h2 class="no-num no-ref heading settled" id="idl-index"><span class="content">IDL Index</span><a class="self-link" href="#idl-index"></a></h2>
<pre class="idl highlight def"><c- b>dictionary</c-> <a href="#dictdef-usbdevicefilter"><code><c- g>USBDeviceFilter</c-></code></a> {
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short⑦"><c- b>unsigned</c-> <c- b>short</c-></a> <a data-type="unsigned short " href="#dom-usbdevicefilter-vendorid"><code><c- g>vendorId</c-></code></a>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short①①"><c- b>unsigned</c-> <c- b>short</c-></a> <a data-type="unsigned short " href="#dom-usbdevicefilter-productid"><code><c- g>productId</c-></code></a>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③⑦"><c- b>octet</c-></a> <a data-type="octet " href="#dom-usbdevicefilter-classcode"><code><c- g>classCode</c-></code></a>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①①⓪"><c- b>octet</c-></a> <a data-type="octet " href="#dom-usbdevicefilter-subclasscode"><code><c- g>subclassCode</c-></code></a>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②①⓪"><c- b>octet</c-></a> <a data-type="octet " href="#dom-usbdevicefilter-protocolcode"><code><c- g>protocolCode</c-></code></a>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑧"><c- b>DOMString</c-></a> <a data-type="DOMString " href="#dom-usbdevicefilter-serialnumber"><code><c- g>serialNumber</c-></code></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-usbdevicerequestoptions"><code><c- g>USBDeviceRequestOptions</c-></code></a> {
  <c- b>required</c-> <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-usbdevicefilter" id="ref-for-dictdef-usbdevicefilter③"><c- n>USBDeviceFilter</c-></a>> <a data-type="sequence<USBDeviceFilter> " href="#dom-usbdevicerequestoptions-filters"><code><c- g>filters</c-></code></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑦"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->), <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⑥"><c- g>SecureContext</c-></a>]
<c- b>interface</c-> <a href="#usb"><code><c- g>USB</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#eventtarget" id="ref-for-eventtarget①"><c- n>EventTarget</c-></a> {
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler②"><c- n>EventHandler</c-></a> <a data-type="EventHandler" href="#dom-usb-onconnect"><code><c- g>onconnect</c-></code></a>;
  <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="https://html.spec.whatwg.org/multipage/webappapis.html#eventhandler" id="ref-for-eventhandler①①"><c- n>EventHandler</c-></a> <a data-type="EventHandler" href="#dom-usb-ondisconnect"><code><c- g>ondisconnect</c-></code></a>;
  <c- b>Promise</c->&lt;<c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#usbdevice" id="ref-for-usbdevice②⓪"><c- n>USBDevice</c-></a>>> <a href="#dom-usb-getdevices"><code><c- g>getDevices</c-></code></a>();
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑧"><c- g>Exposed</c-></a>=<c- n>Window</c->] <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbdevice" id="ref-for-usbdevice①①⓪"><c- n>USBDevice</c-></a>> <a href="#dom-usb-requestdevice"><code><c- g>requestDevice</c-></code></a>(<a class="n" data-link-type="idl-name" href="#dictdef-usbdevicerequestoptions" id="ref-for-dictdef-usbdevicerequestoptions①"><c- n>USBDeviceRequestOptions</c-></a> <a href="#dom-usb-requestdevice-options-options"><code><c- g>options</c-></code></a>);
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed②①"><c- g>Exposed</c-></a>=<c- n>Window</c->, <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⑤"><c- g>SecureContext</c-></a>]
<c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="https://html.spec.whatwg.org/multipage/system-state.html#navigator" id="ref-for-navigator②"><c- g>Navigator</c-></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject③"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#usb" id="ref-for-usb②"><c- n>USB</c-></a> <a data-readonly data-type="USB" href="#dom-navigator-usb"><code><c- g>usb</c-></code></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed③①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->), <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext②①"><c- g>SecureContext</c-></a>]
<c- b>partial</c-> <c- b>interface</c-> <a class="idl-code" data-link-type="interface" href="https://html.spec.whatwg.org/multipage/workers.html#workernavigator" id="ref-for-workernavigator①"><c- g>WorkerNavigator</c-></a> {
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject①①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#usb" id="ref-for-usb①①"><c- n>USB</c-></a> <a data-readonly data-type="USB" href="#dom-workernavigator-usb"><code><c- g>usb</c-></code></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-usbconnectioneventinit"><code><c- g>USBConnectionEventInit</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#dictdef-eventinit" id="ref-for-dictdef-eventinit①"><c- n>EventInit</c-></a> {
    <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#usbdevice" id="ref-for-usbdevice④①"><c- n>USBDevice</c-></a> <a data-type="USBDevice " href="#dom-usbconnectioneventinit-device"><code><c- g>device</c-></code></a>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed④①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext③①"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <a href="#usbconnectionevent"><code><c- g>USBConnectionEvent</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://dom.spec.whatwg.org/#event" id="ref-for-event①"><c- n>Event</c-></a> {
  <a href="#dom-usbconnectionevent-usbconnectionevent"><code><c- g>constructor</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString①①"><c- b>DOMString</c-></a> <a href="#dom-usbconnectionevent-usbconnectionevent-type-eventinitdict-type"><code><c- g>type</c-></code></a>, <a class="n" data-link-type="idl-name" href="#dictdef-usbconnectioneventinit" id="ref-for-dictdef-usbconnectioneventinit①"><c- n>USBConnectionEventInit</c-></a> <a href="#dom-usbconnectionevent-usbconnectionevent-type-eventinitdict-eventinitdict"><code><c- g>eventInitDict</c-></code></a>);
  [<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SameObject" id="ref-for-SameObject②①"><c- g>SameObject</c-></a>] <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#usbdevice" id="ref-for-usbdevice⑤①"><c- n>USBDevice</c-></a> <a data-readonly data-type="USBDevice" href="#dom-usbconnectionevent-device"><code><c- g>device</c-></code></a>;
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑤①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->), <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext④①"><c- g>SecureContext</c-></a>]
<c- b>interface</c-> <a href="#usbdevice"><code><c- g>USBDevice</c-></code></a> {
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③⑥"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbdevice-usbversionmajor"><code><c- g>usbVersionMajor</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet④①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbdevice-usbversionminor"><code><c- g>usbVersionMinor</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet⑤①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbdevice-usbversionsubminor"><code><c- g>usbVersionSubminor</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet⑥①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbdevice-deviceclass"><code><c- g>deviceClass</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet⑦①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbdevice-devicesubclass"><code><c- g>deviceSubclass</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet⑧①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbdevice-deviceprotocol"><code><c- g>deviceProtocol</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short②①"><c- b>unsigned</c-> <c- b>short</c-></a> <a data-readonly data-type="unsigned short" href="#dom-usbdevice-vendorid"><code><c- g>vendorId</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short③①"><c- b>unsigned</c-> <c- b>short</c-></a> <a data-readonly data-type="unsigned short" href="#dom-usbdevice-productid"><code><c- g>productId</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet⑨①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbdevice-deviceversionmajor"><code><c- g>deviceVersionMajor</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①⓪①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbdevice-deviceversionminor"><code><c- g>deviceVersionMinor</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①①①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbdevice-deviceversionsubminor"><code><c- g>deviceVersionSubminor</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString②①"><c- b>DOMString</c-></a>? <a data-readonly data-type="DOMString?" href="#dom-usbdevice-manufacturername"><code><c- g>manufacturerName</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString③①"><c- b>DOMString</c-></a>? <a data-readonly data-type="DOMString?" href="#dom-usbdevice-productname"><code><c- g>productName</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString④①"><c- b>DOMString</c-></a>? <a data-readonly data-type="DOMString?" href="#dom-usbdevice-serialnumber"><code><c- g>serialNumber</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#usbconfiguration" id="ref-for-usbconfiguration④"><c- n>USBConfiguration</c-></a>? <a data-readonly data-type="USBConfiguration?" href="#dom-usbdevice-configuration"><code><c- g>configuration</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbconfiguration" id="ref-for-usbconfiguration①①"><c- n>USBConfiguration</c-></a>> <a data-readonly data-type="FrozenArray<USBConfiguration>" href="#dom-usbdevice-configurations"><code><c- g>configurations</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean②"><c- b>boolean</c-></a> <a data-readonly data-type="boolean" href="#dom-usbdevice-opened"><code><c- g>opened</c-></code></a>;
  <c- b>Promise</c->&lt;<c- b>void</c->> <a href="#dom-usbdevice-open"><code><c- g>open</c-></code></a>();
  <c- b>Promise</c->&lt;<c- b>void</c->> <a href="#dom-usbdevice-close"><code><c- g>close</c-></code></a>();
  <c- b>Promise</c->&lt;<c- b>void</c->> <a href="#dom-usbdevice-selectconfiguration"><code><c- g>selectConfiguration</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①②①"><c- b>octet</c-></a> <a href="#dom-usbdevice-selectconfiguration-configurationvalue-configurationvalue"><code><c- g>configurationValue</c-></code></a>);
  <c- b>Promise</c->&lt;<c- b>void</c->> <a href="#dom-usbdevice-claiminterface"><code><c- g>claimInterface</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①③①"><c- b>octet</c-></a> <a href="#dom-usbdevice-claiminterface-interfacenumber-interfacenumber"><code><c- g>interfaceNumber</c-></code></a>);
  <c- b>Promise</c->&lt;<c- b>void</c->> <a href="#dom-usbdevice-releaseinterface"><code><c- g>releaseInterface</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①④①"><c- b>octet</c-></a> <a href="#dom-usbdevice-releaseinterface-interfacenumber-interfacenumber"><code><c- g>interfaceNumber</c-></code></a>);
  <c- b>Promise</c->&lt;<c- b>void</c->> <a href="#dom-usbdevice-selectalternateinterface"><code><c- g>selectAlternateInterface</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①⑤①"><c- b>octet</c-></a> <a href="#dom-usbdevice-selectalternateinterface-interfacenumber-alternatesetting-interfacenumber"><code><c- g>interfaceNumber</c-></code></a>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①⑥①"><c- b>octet</c-></a> <a href="#dom-usbdevice-selectalternateinterface-interfacenumber-alternatesetting-alternatesetting"><code><c- g>alternateSetting</c-></code></a>);
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbintransferresult" id="ref-for-usbintransferresult④"><c- n>USBInTransferResult</c-></a>> <a href="#dom-usbdevice-controltransferin"><code><c- g>controlTransferIn</c-></code></a>(<a class="n" data-link-type="idl-name" href="#dictdef-usbcontroltransferparameters" id="ref-for-dictdef-usbcontroltransferparameters③"><c- n>USBControlTransferParameters</c-></a> <a href="#dom-usbdevice-controltransferin-setup-length-setup"><code><c- g>setup</c-></code></a>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short④①"><c- b>unsigned</c-> <c- b>short</c-></a> <a href="#dom-usbdevice-controltransferin-setup-length-length"><code><c- g>length</c-></code></a>);
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbouttransferresult" id="ref-for-usbouttransferresult④"><c- n>USBOutTransferResult</c-></a>> <a href="#dom-usbdevice-controltransferout"><code><c- g>controlTransferOut</c-></code></a>(<a class="n" data-link-type="idl-name" href="#dictdef-usbcontroltransferparameters" id="ref-for-dictdef-usbcontroltransferparameters①①"><c- n>USBControlTransferParameters</c-></a> <a href="#dom-usbdevice-controltransferout-setup-data-setup"><code><c- g>setup</c-></code></a>, <c- b>optional</c-> <a class="n" data-link-type="idl-name" href="https://heycam.github.io/webidl/#BufferSource" id="ref-for-BufferSource③"><c- n>BufferSource</c-></a> <a href="#dom-usbdevice-controltransferout-setup-data-data"><code><c- g>data</c-></code></a>);
  <c- b>Promise</c->&lt;<c- b>void</c->> <a href="#dom-usbdevice-clearhalt"><code><c- g>clearHalt</c-></code></a>(<a class="n" data-link-type="idl-name" href="#enumdef-usbdirection" id="ref-for-enumdef-usbdirection③"><c- n>USBDirection</c-></a> <a href="#dom-usbdevice-clearhalt-direction-endpointnumber-direction"><code><c- g>direction</c-></code></a>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①⑦①"><c- b>octet</c-></a> <a href="#dom-usbdevice-clearhalt-direction-endpointnumber-endpointnumber"><code><c- g>endpointNumber</c-></code></a>);
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbintransferresult" id="ref-for-usbintransferresult①①"><c- n>USBInTransferResult</c-></a>> <a href="#dom-usbdevice-transferin"><code><c- g>transferIn</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①⑧①"><c- b>octet</c-></a> <a href="#dom-usbdevice-transferin-endpointnumber-length-endpointnumber"><code><c- g>endpointNumber</c-></code></a>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑧"><c- b>unsigned</c-> <c- b>long</c-></a> <a href="#dom-usbdevice-transferin-endpointnumber-length-length"><code><c- g>length</c-></code></a>);
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbouttransferresult" id="ref-for-usbouttransferresult①①"><c- n>USBOutTransferResult</c-></a>> <a href="#dom-usbdevice-transferout"><code><c- g>transferOut</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet①⑨①"><c- b>octet</c-></a> <a href="#dom-usbdevice-transferout-endpointnumber-data-endpointnumber"><code><c- g>endpointNumber</c-></code></a>, <a class="n" data-link-type="idl-name" href="https://heycam.github.io/webidl/#BufferSource" id="ref-for-BufferSource①①"><c- n>BufferSource</c-></a> <a href="#dom-usbdevice-transferout-endpointnumber-data-data"><code><c- g>data</c-></code></a>);
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbisochronousintransferresult" id="ref-for-usbisochronousintransferresult②"><c- n>USBIsochronousInTransferResult</c-></a>> <a href="#dom-usbdevice-isochronoustransferin"><code><c- g>isochronousTransferIn</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②⓪①"><c- b>octet</c-></a> <a href="#dom-usbdevice-isochronoustransferin-endpointnumber-packetlengths-endpointnumber"><code><c- g>endpointNumber</c-></code></a>, <c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long①①"><c- b>unsigned</c-> <c- b>long</c-></a>> <a href="#dom-usbdevice-isochronoustransferin-endpointnumber-packetlengths-packetlengths"><code><c- g>packetLengths</c-></code></a>);
  <c- b>Promise</c->&lt;<a class="n" data-link-type="idl-name" href="#usbisochronousouttransferresult" id="ref-for-usbisochronousouttransferresult②"><c- n>USBIsochronousOutTransferResult</c-></a>> <a href="#dom-usbdevice-isochronoustransferout"><code><c- g>isochronousTransferOut</c-></code></a>(<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②①①"><c- b>octet</c-></a> <a href="#dom-usbdevice-isochronoustransferout-endpointnumber-data-packetlengths-endpointnumber"><code><c- g>endpointNumber</c-></code></a>, <a class="n" data-link-type="idl-name" href="https://heycam.github.io/webidl/#BufferSource" id="ref-for-BufferSource②①"><c- n>BufferSource</c-></a> <a href="#dom-usbdevice-isochronoustransferout-endpointnumber-data-packetlengths-data"><code><c- g>data</c-></code></a>, <c- b>sequence</c->&lt;<a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long②①"><c- b>unsigned</c-> <c- b>long</c-></a>> <a href="#dom-usbdevice-isochronoustransferout-endpointnumber-data-packetlengths-packetlengths"><code><c- g>packetLengths</c-></code></a>);
  <c- b>Promise</c->&lt;<c- b>void</c->> <a href="#dom-usbdevice-reset"><code><c- g>reset</c-></code></a>();
};

<c- b>enum</c-> <a href="#enumdef-usbrequesttype"><code><c- g>USBRequestType</c-></code></a> {
  <a href="#dom-usbrequesttype-standard"><code><c- s>"standard"</c-></code></a>,
  <a href="#dom-usbrequesttype-class"><code><c- s>"class"</c-></code></a>,
  <a href="#dom-usbrequesttype-vendor"><code><c- s>"vendor"</c-></code></a>
};

<c- b>enum</c-> <a href="#enumdef-usbrecipient"><code><c- g>USBRecipient</c-></code></a> {
  <a href="#dom-usbrecipient-device"><code><c- s>"device"</c-></code></a>,
  <a href="#dom-usbrecipient-interface"><code><c- s>"interface"</c-></code></a>,
  <a href="#dom-usbrecipient-endpoint"><code><c- s>"endpoint"</c-></code></a>,
  <a href="#dom-usbrecipient-other"><code><c- s>"other"</c-></code></a>
};

<c- b>enum</c-> <a href="#enumdef-usbtransferstatus"><code><c- g>USBTransferStatus</c-></code></a> {
  <a href="#dom-usbtransferstatus-ok"><code><c- s>"ok"</c-></code></a>,
  <a href="#dom-usbtransferstatus-stall"><code><c- s>"stall"</c-></code></a>,
  <a href="#dom-usbtransferstatus-babble"><code><c- s>"babble"</c-></code></a>
};

<c- b>dictionary</c-> <a href="#dictdef-usbcontroltransferparameters"><code><c- g>USBControlTransferParameters</c-></code></a> {
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbrequesttype" id="ref-for-enumdef-usbrequesttype①"><c- n>USBRequestType</c-></a> <a data-type="USBRequestType " href="#dom-usbcontroltransferparameters-requesttype"><code><c- g>requestType</c-></code></a>;
  <c- b>required</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbrecipient" id="ref-for-enumdef-usbrecipient①"><c- n>USBRecipient</c-></a> <a data-type="USBRecipient " href="#dom-usbcontroltransferparameters-recipient"><code><c- g>recipient</c-></code></a>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②②①"><c- b>octet</c-></a> <a data-type="octet " href="#dom-usbcontroltransferparameters-request"><code><c- g>request</c-></code></a>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short⑤①"><c- b>unsigned</c-> <c- b>short</c-></a> <a data-type="unsigned short " href="#dom-usbcontroltransferparameters-value"><code><c- g>value</c-></code></a>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-short" id="ref-for-idl-unsigned-short⑥①"><c- b>unsigned</c-> <c- b>short</c-></a> <a data-type="unsigned short " href="#dom-usbcontroltransferparameters-index"><code><c- g>index</c-></code></a>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑥①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑤①"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <a href="#usbintransferresult"><code><c- g>USBInTransferResult</c-></code></a> {
  <a href="#dom-usbintransferresult-usbintransferresult"><code><c- g>constructor</c-></code></a>(<a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus⑧"><c- n>USBTransferStatus</c-></a> <a href="#dom-usbintransferresult-usbintransferresult-status-data-status"><code><c- g>status</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView④①"><c- b>DataView</c-></a>? <a href="#dom-usbintransferresult-usbintransferresult-status-data-data"><code><c- g>data</c-></code></a>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView⑤①"><c- b>DataView</c-></a>? <a data-readonly data-type="DataView?" href="#dom-usbintransferresult-data"><code><c- g>data</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus①①"><c- n>USBTransferStatus</c-></a> <a data-readonly data-type="USBTransferStatus" href="#dom-usbintransferresult-status"><code><c- g>status</c-></code></a>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑦①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑥①"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <a href="#usbouttransferresult"><code><c- g>USBOutTransferResult</c-></code></a> {
  <a href="#dom-usbouttransferresult-usbouttransferresult"><code><c- g>constructor</c-></code></a>(<a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus②①"><c- n>USBTransferStatus</c-></a> <a href="#dom-usbouttransferresult-usbouttransferresult-status-byteswritten-status"><code><c- g>status</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long③①"><c- b>unsigned</c-> <c- b>long</c-></a> <a href="#dom-usbouttransferresult-usbouttransferresult-status-byteswritten-byteswritten"><code><c- g>bytesWritten</c-></code></a> = 0);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long④①"><c- b>unsigned</c-> <c- b>long</c-></a> <a data-readonly data-type="unsigned long" href="#dom-usbouttransferresult-byteswritten"><code><c- g>bytesWritten</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus③①"><c- n>USBTransferStatus</c-></a> <a data-readonly data-type="USBTransferStatus" href="#dom-usbouttransferresult-status"><code><c- g>status</c-></code></a>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑧①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑦①"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <a href="#usbisochronousintransferpacket"><code><c- g>USBIsochronousInTransferPacket</c-></code></a> {
  <a href="#dom-usbisochronousintransferpacket-usbisochronousintransferpacket"><code><c- g>constructor</c-></code></a>(<a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus④①"><c- n>USBTransferStatus</c-></a> <a href="#dom-usbisochronousintransferpacket-usbisochronousintransferpacket-status-data-status"><code><c- g>status</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView⑥①"><c- b>DataView</c-></a>? <a href="#dom-usbisochronousintransferpacket-usbisochronousintransferpacket-status-data-data"><code><c- g>data</c-></code></a>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView⑦①"><c- b>DataView</c-></a>? <a data-readonly data-type="DataView?" href="#dom-usbisochronousintransferpacket-data"><code><c- g>data</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus⑤①"><c- n>USBTransferStatus</c-></a> <a data-readonly data-type="USBTransferStatus" href="#dom-usbisochronousintransferpacket-status"><code><c- g>status</c-></code></a>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed⑨①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑧①"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <a href="#usbisochronousintransferresult"><code><c- g>USBIsochronousInTransferResult</c-></code></a> {
  <a href="#dom-usbisochronousintransferresult-usbisochronousintransferresult"><code><c- g>constructor</c-></code></a>(<c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#usbisochronousintransferpacket" id="ref-for-usbisochronousintransferpacket①①"><c- n>USBIsochronousInTransferPacket</c-></a>> <a href="#dom-usbisochronousintransferresult-usbisochronousintransferresult-packets-data-packets"><code><c- g>packets</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView⑧①"><c- b>DataView</c-></a>? <a href="#dom-usbisochronousintransferresult-usbisochronousintransferresult-packets-data-data"><code><c- g>data</c-></code></a>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DataView" id="ref-for-idl-DataView⑨①"><c- b>DataView</c-></a>? <a data-readonly data-type="DataView?" href="#dom-usbisochronousintransferresult-data"><code><c- g>data</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbisochronousintransferpacket" id="ref-for-usbisochronousintransferpacket②①"><c- n>USBIsochronousInTransferPacket</c-></a>> <a data-readonly data-type="FrozenArray<USBIsochronousInTransferPacket>" href="#dom-usbisochronousintransferresult-packets"><code><c- g>packets</c-></code></a>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⓪①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext⑨①"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <a href="#usbisochronousouttransferpacket"><code><c- g>USBIsochronousOutTransferPacket</c-></code></a> {
  <a href="#dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket"><code><c- g>constructor</c-></code></a>(<a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus⑥①"><c- n>USBTransferStatus</c-></a> <a href="#dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket-status-byteswritten-status"><code><c- g>status</c-></code></a>, <c- b>optional</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑤①"><c- b>unsigned</c-> <c- b>long</c-></a> <a href="#dom-usbisochronousouttransferpacket-usbisochronousouttransferpacket-status-byteswritten-byteswritten"><code><c- g>bytesWritten</c-></code></a> = 0);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑥①"><c- b>unsigned</c-> <c- b>long</c-></a> <a data-readonly data-type="unsigned long" href="#dom-usbisochronousouttransferpacket-byteswritten"><code><c- g>bytesWritten</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbtransferstatus" id="ref-for-enumdef-usbtransferstatus⑦①"><c- n>USBTransferStatus</c-></a> <a data-readonly data-type="USBTransferStatus" href="#dom-usbisochronousouttransferpacket-status"><code><c- g>status</c-></code></a>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①①①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①⓪①"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <a href="#usbisochronousouttransferresult"><code><c- g>USBIsochronousOutTransferResult</c-></code></a> {
  <a href="#dom-usbisochronousouttransferresult-usbisochronousouttransferresult"><code><c- g>constructor</c-></code></a>(<c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#usbisochronousouttransferpacket" id="ref-for-usbisochronousouttransferpacket①①"><c- n>USBIsochronousOutTransferPacket</c-></a>> <a href="#dom-usbisochronousouttransferresult-usbisochronousouttransferresult-packets-packets"><code><c- g>packets</c-></code></a>);
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbisochronousouttransferpacket" id="ref-for-usbisochronousouttransferpacket②①"><c- n>USBIsochronousOutTransferPacket</c-></a>> <a data-readonly data-type="FrozenArray<USBIsochronousOutTransferPacket>" href="#dom-usbisochronousouttransferresult-packets"><code><c- g>packets</c-></code></a>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①②①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①①①"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <a href="#usbconfiguration"><code><c- g>USBConfiguration</c-></code></a> {
  <a href="#dom-usbconfiguration-usbconfiguration"><code><c- g>constructor</c-></code></a>(<a class="n" data-link-type="idl-name" href="#usbdevice" id="ref-for-usbdevice①⑦①"><c- n>USBDevice</c-></a> <a href="#dom-usbconfiguration-usbconfiguration-device-configurationvalue-device"><code><c- g>device</c-></code></a>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②③①"><c- b>octet</c-></a> <a href="#dom-usbconfiguration-usbconfiguration-device-configurationvalue-configurationvalue"><code><c- g>configurationValue</c-></code></a>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②④①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbconfiguration-configurationvalue"><code><c- g>configurationValue</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑤①"><c- b>DOMString</c-></a>? <a data-readonly data-type="DOMString?" href="#dom-usbconfiguration-configurationname"><code><c- g>configurationName</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbinterface" id="ref-for-usbinterface②"><c- n>USBInterface</c-></a>> <a data-readonly data-type="FrozenArray<USBInterface>" href="#dom-usbconfiguration-interfaces"><code><c- g>interfaces</c-></code></a>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①③①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①②①"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <a href="#usbinterface"><code><c- g>USBInterface</c-></code></a> {
  <a href="#dom-usbinterface-usbinterface"><code><c- g>constructor</c-></code></a>(<a class="n" data-link-type="idl-name" href="#usbconfiguration" id="ref-for-usbconfiguration②①"><c- n>USBConfiguration</c-></a> <a href="#dom-usbinterface-usbinterface-configuration-interfacenumber-configuration"><code><c- g>configuration</c-></code></a>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②⑤①"><c- b>octet</c-></a> <a href="#dom-usbinterface-usbinterface-configuration-interfacenumber-interfacenumber"><code><c- g>interfaceNumber</c-></code></a>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②⑥①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbinterface-interfacenumber"><code><c- g>interfaceNumber</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#usbalternateinterface" id="ref-for-usbalternateinterface⑥"><c- n>USBAlternateInterface</c-></a> <a data-readonly data-type="USBAlternateInterface" href="#dom-usbinterface-alternate"><code><c- g>alternate</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbalternateinterface" id="ref-for-usbalternateinterface①①"><c- n>USBAlternateInterface</c-></a>> <a data-readonly data-type="FrozenArray<USBAlternateInterface>" href="#dom-usbinterface-alternates"><code><c- g>alternates</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-boolean" id="ref-for-idl-boolean①①"><c- b>boolean</c-></a> <a data-readonly data-type="boolean" href="#dom-usbinterface-claimed"><code><c- g>claimed</c-></code></a>;
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①④①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①③①"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <a href="#usbalternateinterface"><code><c- g>USBAlternateInterface</c-></code></a> {
  <a href="#dom-usbalternateinterface-usbalternateinterface"><code><c- g>constructor</c-></code></a>(<a class="n" data-link-type="idl-name" href="#usbinterface" id="ref-for-usbinterface①①"><c- n>USBInterface</c-></a> <a href="#dom-usbalternateinterface-usbalternateinterface-deviceinterface-alternatesetting-deviceinterface"><code><c- g>deviceInterface</c-></code></a>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②⑦①"><c- b>octet</c-></a> <a href="#dom-usbalternateinterface-usbalternateinterface-deviceinterface-alternatesetting-alternatesetting"><code><c- g>alternateSetting</c-></code></a>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②⑧①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbalternateinterface-alternatesetting"><code><c- g>alternateSetting</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet②⑨①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbalternateinterface-interfaceclass"><code><c- g>interfaceClass</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③⓪①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbalternateinterface-interfacesubclass"><code><c- g>interfaceSubclass</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③①①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbalternateinterface-interfaceprotocol"><code><c- g>interfaceProtocol</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑥①"><c- b>DOMString</c-></a>? <a data-readonly data-type="DOMString?" href="#dom-usbalternateinterface-interfacename"><code><c- g>interfaceName</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbendpoint" id="ref-for-usbendpoint①"><c- n>USBEndpoint</c-></a>> <a data-readonly data-type="FrozenArray<USBEndpoint>" href="#dom-usbalternateinterface-endpoints"><code><c- g>endpoints</c-></code></a>;
};

<c- b>enum</c-> <a href="#enumdef-usbdirection"><code><c- g>USBDirection</c-></code></a> {
  <a href="#dom-usbdirection-in"><code><c- s>"in"</c-></code></a>,
  <a href="#dom-usbdirection-out"><code><c- s>"out"</c-></code></a>
};

<c- b>enum</c-> <a href="#enumdef-usbendpointtype"><code><c- g>USBEndpointType</c-></code></a> {
  <a href="#dom-usbendpointtype-bulk"><code><c- s>"bulk"</c-></code></a>,
  <a href="#dom-usbendpointtype-interrupt"><code><c- s>"interrupt"</c-></code></a>,
  <a href="#dom-usbendpointtype-isochronous"><code><c- s>"isochronous"</c-></code></a>
};

[
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑤①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->),
  <a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#SecureContext" id="ref-for-SecureContext①④①"><c- g>SecureContext</c-></a>
]
<c- b>interface</c-> <a href="#usbendpoint"><code><c- g>USBEndpoint</c-></code></a> {
  <a href="#dom-usbendpoint-usbendpoint"><code><c- g>constructor</c-></code></a>(<a class="n" data-link-type="idl-name" href="#usbalternateinterface" id="ref-for-usbalternateinterface⑤①"><c- n>USBAlternateInterface</c-></a> <a href="#dom-usbendpoint-usbendpoint-alternate-endpointnumber-direction-alternate"><code><c- g>alternate</c-></code></a>, <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③②①"><c- b>octet</c-></a> <a href="#dom-usbendpoint-usbendpoint-alternate-endpointnumber-direction-endpointnumber"><code><c- g>endpointNumber</c-></code></a>, <a class="n" data-link-type="idl-name" href="#enumdef-usbdirection" id="ref-for-enumdef-usbdirection①①"><c- n>USBDirection</c-></a> <a href="#dom-usbendpoint-usbendpoint-alternate-endpointnumber-direction-direction"><code><c- g>direction</c-></code></a>);
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③③①"><c- b>octet</c-></a> <a data-readonly data-type="octet" href="#dom-usbendpoint-endpointnumber"><code><c- g>endpointNumber</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbdirection" id="ref-for-enumdef-usbdirection②①"><c- n>USBDirection</c-></a> <a data-readonly data-type="USBDirection" href="#dom-usbendpoint-direction"><code><c- g>direction</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="n" data-link-type="idl-name" href="#enumdef-usbendpointtype" id="ref-for-enumdef-usbendpointtype①"><c- n>USBEndpointType</c-></a> <a data-readonly data-type="USBEndpointType" href="#dom-usbendpoint-type"><code><c- g>type</c-></code></a>;
  <c- b>readonly</c-> <c- b>attribute</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-unsigned-long" id="ref-for-idl-unsigned-long⑦①"><c- b>unsigned</c-> <c- b>long</c-></a> <a data-readonly data-type="unsigned long" href="#dom-usbendpoint-packetsize"><code><c- g>packetSize</c-></code></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-usbpermissiondescriptor"><code><c- g>USBPermissionDescriptor</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://w3c.github.io/permissions/#dictdef-permissiondescriptor" id="ref-for-dictdef-permissiondescriptor①"><c- n>PermissionDescriptor</c-></a> {
  <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-usbdevicefilter" id="ref-for-dictdef-usbdevicefilter②①"><c- n>USBDeviceFilter</c-></a>> <a data-type="sequence<USBDeviceFilter> " href="#dom-usbpermissiondescriptor-filters"><code><c- g>filters</c-></code></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-allowedusbdevice"><code><c- g>AllowedUSBDevice</c-></code></a> {
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③④①"><c- b>octet</c-></a> <a data-type="octet " href="#dom-allowedusbdevice-vendorid"><code><c- g>vendorId</c-></code></a>;
  <c- b>required</c-> <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-octet" id="ref-for-idl-octet③⑤①"><c- b>octet</c-></a> <a data-type="octet " href="#dom-allowedusbdevice-productid"><code><c- g>productId</c-></code></a>;
  <a class="idl-code" data-link-type="interface" href="https://heycam.github.io/webidl/#idl-DOMString" id="ref-for-idl-DOMString⑦①"><c- b>DOMString</c-></a> <a data-type="DOMString " href="#dom-allowedusbdevice-serialnumber"><code><c- g>serialNumber</c-></code></a>;
};

<c- b>dictionary</c-> <a href="#dictdef-usbpermissionstorage"><code><c- g>USBPermissionStorage</c-></code></a> {
  <c- b>sequence</c->&lt;<a class="n" data-link-type="idl-name" href="#dictdef-allowedusbdevice" id="ref-for-dictdef-allowedusbdevice②"><c- n>AllowedUSBDevice</c-></a>> <a data-default="[]" data-type="sequence<AllowedUSBDevice> " href="#dom-usbpermissionstorage-alloweddevices"><code><c- g>allowedDevices</c-></code></a> = [];
};

[<a class="idl-code" data-link-type="extended-attribute" href="https://heycam.github.io/webidl/#Exposed" id="ref-for-Exposed①⑥①"><c- g>Exposed</c-></a>=(<c- n>DedicatedWorker</c->,<c- n>SharedWorker</c->,<c- n>Window</c->)]
<c- b>interface</c-> <a href="#usbpermissionresult"><code><c- g>USBPermissionResult</c-></code></a> : <a class="n" data-link-type="idl-name" href="https://w3c.github.io/permissions/#permissionstatus" id="ref-for-permissionstatus①"><c- n>PermissionStatus</c-></a> {
  <c- b>attribute</c-> <c- b>FrozenArray</c->&lt;<a class="n" data-link-type="idl-name" href="#usbdevice" id="ref-for-usbdevice①⑧①"><c- n>USBDevice</c-></a>> <a data-type="FrozenArray<USBDevice>" href="#dom-usbpermissionresult-devices"><code><c- g>devices</c-></code></a>;
};

</pre>
  <h2 class="no-num no-ref heading settled" id="issues-index"><span class="content">Issues Index</span><a class="self-link" href="#issues-index"></a></h2>
  <div style="counter-reset:issue">
   <div class="issue"> What configuration is the device in after it resets? <a href="https://github.com/WICG/webusb/issues/36">&lt;https://github.com/WICG/webusb/issues/36></a><a href="#issue-0de671a3"> ↵ </a></div>
   <div class="issue"> Include some non-normative information about device configurations. <a href="https://github.com/WICG/webusb/issues/46">&lt;https://github.com/WICG/webusb/issues/46></a><a href="#issue-7197531b"> ↵ </a></div>
  </div>
  <aside class="dfn-panel" data-for="webusb-platform-capability-descriptor">
   <b><a href="#webusb-platform-capability-descriptor">#webusb-platform-capability-descriptor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-webusb-platform-capability-descriptor">4.2. WebUSB Device Requests</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="landing-page">
   <b><a href="#landing-page">#landing-page</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-landing-page">2.3. Devices Updates and Diagnostics</a>
    <li><a href="#ref-for-landing-page①">4.1. WebUSB Platform Capability Descriptor</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="get-url">
   <b><a href="#get-url">#get-url</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-get-url">4.3.1. URL Descriptor</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="url-descriptor">
   <b><a href="#url-descriptor">#url-descriptor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-url-descriptor">4.2.1. Get URL</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-usbdevicefilter">
   <b><a href="#dictdef-usbdevicefilter">#dictdef-usbdevicefilter</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-usbdevicefilter">5. Device Enumeration</a> <a href="#ref-for-dictdef-usbdevicefilter①">(2)</a>
    <li><a href="#ref-for-dictdef-usbdevicefilter②">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevicefilter-vendorid">
   <b><a href="#dom-usbdevicefilter-vendorid">#dom-usbdevicefilter-vendorid</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevicefilter-vendorid">5. Device Enumeration</a> <a href="#ref-for-dom-usbdevicefilter-vendorid①">(2)</a> <a href="#ref-for-dom-usbdevicefilter-vendorid②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevicefilter-productid">
   <b><a href="#dom-usbdevicefilter-productid">#dom-usbdevicefilter-productid</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevicefilter-productid">5. Device Enumeration</a> <a href="#ref-for-dom-usbdevicefilter-productid①">(2)</a> <a href="#ref-for-dom-usbdevicefilter-productid②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevicefilter-classcode">
   <b><a href="#dom-usbdevicefilter-classcode">#dom-usbdevicefilter-classcode</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevicefilter-classcode">5. Device Enumeration</a> <a href="#ref-for-dom-usbdevicefilter-classcode①">(2)</a> <a href="#ref-for-dom-usbdevicefilter-classcode②">(3)</a> <a href="#ref-for-dom-usbdevicefilter-classcode③">(4)</a> <a href="#ref-for-dom-usbdevicefilter-classcode④">(5)</a> <a href="#ref-for-dom-usbdevicefilter-classcode⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevicefilter-subclasscode">
   <b><a href="#dom-usbdevicefilter-subclasscode">#dom-usbdevicefilter-subclasscode</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevicefilter-subclasscode">5. Device Enumeration</a> <a href="#ref-for-dom-usbdevicefilter-subclasscode①">(2)</a> <a href="#ref-for-dom-usbdevicefilter-subclasscode②">(3)</a> <a href="#ref-for-dom-usbdevicefilter-subclasscode③">(4)</a> <a href="#ref-for-dom-usbdevicefilter-subclasscode④">(5)</a> <a href="#ref-for-dom-usbdevicefilter-subclasscode⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevicefilter-protocolcode">
   <b><a href="#dom-usbdevicefilter-protocolcode">#dom-usbdevicefilter-protocolcode</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevicefilter-protocolcode">5. Device Enumeration</a> <a href="#ref-for-dom-usbdevicefilter-protocolcode①">(2)</a> <a href="#ref-for-dom-usbdevicefilter-protocolcode②">(3)</a> <a href="#ref-for-dom-usbdevicefilter-protocolcode③">(4)</a> <a href="#ref-for-dom-usbdevicefilter-protocolcode④">(5)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevicefilter-serialnumber">
   <b><a href="#dom-usbdevicefilter-serialnumber">#dom-usbdevicefilter-serialnumber</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevicefilter-serialnumber">5. Device Enumeration</a> <a href="#ref-for-dom-usbdevicefilter-serialnumber①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-usbdevicerequestoptions">
   <b><a href="#dictdef-usbdevicerequestoptions">#dictdef-usbdevicerequestoptions</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-usbdevicerequestoptions">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevicerequestoptions-filters">
   <b><a href="#dom-usbdevicerequestoptions-filters">#dom-usbdevicerequestoptions-filters</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevicerequestoptions-filters">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usb">
   <b><a href="#usb">#usb</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usb">5. Device Enumeration</a> <a href="#ref-for-usb①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usb-onconnect">
   <b><a href="#dom-usb-onconnect">#dom-usb-onconnect</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usb-onconnect">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usb-ondisconnect">
   <b><a href="#dom-usb-ondisconnect">#dom-usb-ondisconnect</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usb-ondisconnect">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usb-getdevices">
   <b><a href="#dom-usb-getdevices">#dom-usb-getdevices</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usb-getdevices">5. Device Enumeration</a> <a href="#ref-for-dom-usb-getdevices①">(2)</a> <a href="#ref-for-dom-usb-getdevices②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usb-requestdevice">
   <b><a href="#dom-usb-requestdevice">#dom-usb-requestdevice</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usb-requestdevice">3.1. Abusing Access to a Device</a>
    <li><a href="#ref-for-dom-usb-requestdevice①">3.2. Attacking a Device</a>
    <li><a href="#ref-for-dom-usb-requestdevice②">5. Device Enumeration</a> <a href="#ref-for-dom-usb-requestdevice③">(2)</a> <a href="#ref-for-dom-usb-requestdevice④">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-navigator-usb">
   <b><a href="#dom-navigator-usb">#dom-navigator-usb</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-navigator-usb">5.1. Events</a> <a href="#ref-for-dom-navigator-usb①">(2)</a>
    <li><a href="#ref-for-dom-navigator-usb②">7.1. Feature Policy</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="match-a-device-filter">
   <b><a href="#match-a-device-filter">#match-a-device-filter</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-match-a-device-filter">5. Device Enumeration</a>
    <li><a href="#ref-for-match-a-device-filter①">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="matches-the-interface-filter">
   <b><a href="#matches-the-interface-filter">#matches-the-interface-filter</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-matches-the-interface-filter">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="is-not-a-valid-filter">
   <b><a href="#is-not-a-valid-filter">#is-not-a-valid-filter</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-is-not-a-valid-filter">5. Device Enumeration</a>
    <li><a href="#ref-for-is-not-a-valid-filter①">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumerate-all-devices-attached-to-the-system">
   <b><a href="#enumerate-all-devices-attached-to-the-system">#enumerate-all-devices-attached-to-the-system</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumerate-all-devices-attached-to-the-system">5. Device Enumeration</a> <a href="#ref-for-enumerate-all-devices-attached-to-the-system①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="request-the-usb-permission">
   <b><a href="#request-the-usb-permission">#request-the-usb-permission</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-request-the-usb-permission">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="add-device-to-storage">
   <b><a href="#add-device-to-storage">#add-device-to-storage</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-add-device-to-storage">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="check-permissions-for-device">
   <b><a href="#check-permissions-for-device">#check-permissions-for-device</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-check-permissions-for-device">5. Device Enumeration</a>
    <li><a href="#ref-for-check-permissions-for-device①">5.1. Events</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-usbconnectioneventinit">
   <b><a href="#dictdef-usbconnectioneventinit">#dictdef-usbconnectioneventinit</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-usbconnectioneventinit">5.1. Events</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbconnectionevent">
   <b><a href="#usbconnectionevent">#usbconnectionevent</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbconnectionevent">5.1. Events</a> <a href="#ref-for-usbconnectionevent①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="connect">
   <b><a href="#connect">#connect</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-connect">5. Device Enumeration</a> <a href="#ref-for-connect①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="disconnect">
   <b><a href="#disconnect">#disconnect</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-disconnect">5. Device Enumeration</a> <a href="#ref-for-disconnect①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbdevice">
   <b><a href="#usbdevice">#usbdevice</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbdevice">5. Device Enumeration</a> <a href="#ref-for-usbdevice①">(2)</a> <a href="#ref-for-usbdevice②">(3)</a> <a href="#ref-for-usbdevice③">(4)</a>
    <li><a href="#ref-for-usbdevice④">5.1. Events</a> <a href="#ref-for-usbdevice⑤">(2)</a> <a href="#ref-for-usbdevice⑥">(3)</a> <a href="#ref-for-usbdevice⑦">(4)</a>
    <li><a href="#ref-for-usbdevice⑧">6. Device Usage</a> <a href="#ref-for-usbdevice⑨">(2)</a> <a href="#ref-for-usbdevice①⓪">(3)</a> <a href="#ref-for-usbdevice①①">(4)</a> <a href="#ref-for-usbdevice①②">(5)</a> <a href="#ref-for-usbdevice①③">(6)</a> <a href="#ref-for-usbdevice①④">(7)</a> <a href="#ref-for-usbdevice①⑤">(8)</a> <a href="#ref-for-usbdevice①⑥">(9)</a>
    <li><a href="#ref-for-usbdevice①⑦">6.2. Configurations</a>
    <li><a href="#ref-for-usbdevice①⑧">7.2. Permission API</a> <a href="#ref-for-usbdevice①⑨">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-usbversionmajor">
   <b><a href="#dom-usbdevice-usbversionmajor">#dom-usbdevice-usbversionmajor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-usbversionmajor">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-usbversionminor">
   <b><a href="#dom-usbdevice-usbversionminor">#dom-usbdevice-usbversionminor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-usbversionminor">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-usbversionsubminor">
   <b><a href="#dom-usbdevice-usbversionsubminor">#dom-usbdevice-usbversionsubminor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-usbversionsubminor">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-deviceclass">
   <b><a href="#dom-usbdevice-deviceclass">#dom-usbdevice-deviceclass</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-deviceclass">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-devicesubclass">
   <b><a href="#dom-usbdevice-devicesubclass">#dom-usbdevice-devicesubclass</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-devicesubclass">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-deviceprotocol">
   <b><a href="#dom-usbdevice-deviceprotocol">#dom-usbdevice-deviceprotocol</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-deviceprotocol">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-vendorid">
   <b><a href="#dom-usbdevice-vendorid">#dom-usbdevice-vendorid</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-vendorid">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-productid">
   <b><a href="#dom-usbdevice-productid">#dom-usbdevice-productid</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-productid">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-deviceversionmajor">
   <b><a href="#dom-usbdevice-deviceversionmajor">#dom-usbdevice-deviceversionmajor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-deviceversionmajor">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-deviceversionminor">
   <b><a href="#dom-usbdevice-deviceversionminor">#dom-usbdevice-deviceversionminor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-deviceversionminor">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-deviceversionsubminor">
   <b><a href="#dom-usbdevice-deviceversionsubminor">#dom-usbdevice-deviceversionsubminor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-deviceversionsubminor">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-manufacturername">
   <b><a href="#dom-usbdevice-manufacturername">#dom-usbdevice-manufacturername</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-manufacturername">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-productname">
   <b><a href="#dom-usbdevice-productname">#dom-usbdevice-productname</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-productname">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-serialnumber">
   <b><a href="#dom-usbdevice-serialnumber">#dom-usbdevice-serialnumber</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-serialnumber">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-configuration">
   <b><a href="#dom-usbdevice-configuration">#dom-usbdevice-configuration</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-configuration">6. Device Usage</a> <a href="#ref-for-dom-usbdevice-configuration①">(2)</a> <a href="#ref-for-dom-usbdevice-configuration②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-configurations">
   <b><a href="#dom-usbdevice-configurations">#dom-usbdevice-configurations</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-configurations">6. Device Usage</a> <a href="#ref-for-dom-usbdevice-configurations①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-opened">
   <b><a href="#dom-usbdevice-opened">#dom-usbdevice-opened</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-opened">6. Device Usage</a> <a href="#ref-for-dom-usbdevice-opened①">(2)</a> <a href="#ref-for-dom-usbdevice-opened②">(3)</a> <a href="#ref-for-dom-usbdevice-opened③">(4)</a> <a href="#ref-for-dom-usbdevice-opened④">(5)</a> <a href="#ref-for-dom-usbdevice-opened⑤">(6)</a> <a href="#ref-for-dom-usbdevice-opened⑥">(7)</a> <a href="#ref-for-dom-usbdevice-opened⑦">(8)</a> <a href="#ref-for-dom-usbdevice-opened⑧">(9)</a> <a href="#ref-for-dom-usbdevice-opened⑨">(10)</a> <a href="#ref-for-dom-usbdevice-opened①⓪">(11)</a> <a href="#ref-for-dom-usbdevice-opened①①">(12)</a> <a href="#ref-for-dom-usbdevice-opened①②">(13)</a> <a href="#ref-for-dom-usbdevice-opened①③">(14)</a> <a href="#ref-for-dom-usbdevice-opened①④">(15)</a> <a href="#ref-for-dom-usbdevice-opened①⑤">(16)</a> <a href="#ref-for-dom-usbdevice-opened①⑥">(17)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-open">
   <b><a href="#dom-usbdevice-open">#dom-usbdevice-open</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-open">6. Device Usage</a> <a href="#ref-for-dom-usbdevice-open①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-close">
   <b><a href="#dom-usbdevice-close">#dom-usbdevice-close</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-close">6. Device Usage</a> <a href="#ref-for-dom-usbdevice-close①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-selectconfiguration">
   <b><a href="#dom-usbdevice-selectconfiguration">#dom-usbdevice-selectconfiguration</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-selectconfiguration">6. Device Usage</a> <a href="#ref-for-dom-usbdevice-selectconfiguration①">(2)</a> <a href="#ref-for-dom-usbdevice-selectconfiguration②">(3)</a>
    <li><a href="#ref-for-dom-usbdevice-selectconfiguration③">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-claiminterface">
   <b><a href="#dom-usbdevice-claiminterface">#dom-usbdevice-claiminterface</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-claiminterface">3.1. Abusing Access to a Device</a>
    <li><a href="#ref-for-dom-usbdevice-claiminterface①">6. Device Usage</a> <a href="#ref-for-dom-usbdevice-claiminterface②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-releaseinterface">
   <b><a href="#dom-usbdevice-releaseinterface">#dom-usbdevice-releaseinterface</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-releaseinterface">6. Device Usage</a> <a href="#ref-for-dom-usbdevice-releaseinterface①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-selectalternateinterface">
   <b><a href="#dom-usbdevice-selectalternateinterface">#dom-usbdevice-selectalternateinterface</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-selectalternateinterface">6. Device Usage</a>
    <li><a href="#ref-for-dom-usbdevice-selectalternateinterface①">6.3. Interfaces</a> <a href="#ref-for-dom-usbdevice-selectalternateinterface②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-controltransferin">
   <b><a href="#dom-usbdevice-controltransferin">#dom-usbdevice-controltransferin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-controltransferin">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-controltransferout">
   <b><a href="#dom-usbdevice-controltransferout">#dom-usbdevice-controltransferout</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-controltransferout">6. Device Usage</a> <a href="#ref-for-dom-usbdevice-controltransferout①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-clearhalt">
   <b><a href="#dom-usbdevice-clearhalt">#dom-usbdevice-clearhalt</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-clearhalt">6. Device Usage</a> <a href="#ref-for-dom-usbdevice-clearhalt①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-transferin">
   <b><a href="#dom-usbdevice-transferin">#dom-usbdevice-transferin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-transferin">6. Device Usage</a> <a href="#ref-for-dom-usbdevice-transferin①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-transferout">
   <b><a href="#dom-usbdevice-transferout">#dom-usbdevice-transferout</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-transferout">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-isochronoustransferin">
   <b><a href="#dom-usbdevice-isochronoustransferin">#dom-usbdevice-isochronoustransferin</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-isochronoustransferin">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-isochronoustransferout">
   <b><a href="#dom-usbdevice-isochronoustransferout">#dom-usbdevice-isochronoustransferout</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-isochronoustransferout">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdevice-reset">
   <b><a href="#dom-usbdevice-reset">#dom-usbdevice-reset</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdevice-reset">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-usbrequesttype">
   <b><a href="#enumdef-usbrequesttype">#enumdef-usbrequesttype</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-usbrequesttype">6.1. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbrequesttype-vendor">
   <b><a href="#dom-usbrequesttype-vendor">#dom-usbrequesttype-vendor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbrequesttype-vendor">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-usbrecipient">
   <b><a href="#enumdef-usbrecipient">#enumdef-usbrecipient</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-usbrecipient">6.1. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbrecipient-interface">
   <b><a href="#dom-usbrecipient-interface">#dom-usbrecipient-interface</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbrecipient-interface">6. Device Usage</a>
    <li><a href="#ref-for-dom-usbrecipient-interface①">6.1. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbrecipient-endpoint">
   <b><a href="#dom-usbrecipient-endpoint">#dom-usbrecipient-endpoint</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbrecipient-endpoint">6.1. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-usbtransferstatus">
   <b><a href="#enumdef-usbtransferstatus">#enumdef-usbtransferstatus</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-usbtransferstatus">6.1. Transfers</a> <a href="#ref-for-enumdef-usbtransferstatus①">(2)</a> <a href="#ref-for-enumdef-usbtransferstatus②">(3)</a> <a href="#ref-for-enumdef-usbtransferstatus③">(4)</a> <a href="#ref-for-enumdef-usbtransferstatus④">(5)</a> <a href="#ref-for-enumdef-usbtransferstatus⑤">(6)</a> <a href="#ref-for-enumdef-usbtransferstatus⑥">(7)</a> <a href="#ref-for-enumdef-usbtransferstatus⑦">(8)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbtransferstatus-ok">
   <b><a href="#dom-usbtransferstatus-ok">#dom-usbtransferstatus-ok</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbtransferstatus-ok">6. Device Usage</a> <a href="#ref-for-dom-usbtransferstatus-ok①">(2)</a> <a href="#ref-for-dom-usbtransferstatus-ok②">(3)</a> <a href="#ref-for-dom-usbtransferstatus-ok③">(4)</a> <a href="#ref-for-dom-usbtransferstatus-ok④">(5)</a> <a href="#ref-for-dom-usbtransferstatus-ok⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbtransferstatus-stall">
   <b><a href="#dom-usbtransferstatus-stall">#dom-usbtransferstatus-stall</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbtransferstatus-stall">6. Device Usage</a> <a href="#ref-for-dom-usbtransferstatus-stall①">(2)</a> <a href="#ref-for-dom-usbtransferstatus-stall②">(3)</a> <a href="#ref-for-dom-usbtransferstatus-stall③">(4)</a> <a href="#ref-for-dom-usbtransferstatus-stall④">(5)</a> <a href="#ref-for-dom-usbtransferstatus-stall⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbtransferstatus-babble">
   <b><a href="#dom-usbtransferstatus-babble">#dom-usbtransferstatus-babble</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbtransferstatus-babble">6. Device Usage</a> <a href="#ref-for-dom-usbtransferstatus-babble①">(2)</a> <a href="#ref-for-dom-usbtransferstatus-babble②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-usbcontroltransferparameters">
   <b><a href="#dictdef-usbcontroltransferparameters">#dictdef-usbcontroltransferparameters</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-usbcontroltransferparameters">6. Device Usage</a> <a href="#ref-for-dictdef-usbcontroltransferparameters①">(2)</a>
    <li><a href="#ref-for-dictdef-usbcontroltransferparameters②">6.1. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbcontroltransferparameters-requesttype">
   <b><a href="#dom-usbcontroltransferparameters-requesttype">#dom-usbcontroltransferparameters-requesttype</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbcontroltransferparameters-requesttype">6. Device Usage</a>
    <li><a href="#ref-for-dom-usbcontroltransferparameters-requesttype①">6.1. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbcontroltransferparameters-recipient">
   <b><a href="#dom-usbcontroltransferparameters-recipient">#dom-usbcontroltransferparameters-recipient</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbcontroltransferparameters-recipient">6. Device Usage</a>
    <li><a href="#ref-for-dom-usbcontroltransferparameters-recipient①">6.1. Transfers</a> <a href="#ref-for-dom-usbcontroltransferparameters-recipient②">(2)</a> <a href="#ref-for-dom-usbcontroltransferparameters-recipient③">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbcontroltransferparameters-request">
   <b><a href="#dom-usbcontroltransferparameters-request">#dom-usbcontroltransferparameters-request</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbcontroltransferparameters-request">6. Device Usage</a>
    <li><a href="#ref-for-dom-usbcontroltransferparameters-request①">6.1. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbcontroltransferparameters-value">
   <b><a href="#dom-usbcontroltransferparameters-value">#dom-usbcontroltransferparameters-value</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbcontroltransferparameters-value">6. Device Usage</a>
    <li><a href="#ref-for-dom-usbcontroltransferparameters-value①">6.1. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbcontroltransferparameters-index">
   <b><a href="#dom-usbcontroltransferparameters-index">#dom-usbcontroltransferparameters-index</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbcontroltransferparameters-index">6. Device Usage</a>
    <li><a href="#ref-for-dom-usbcontroltransferparameters-index①">6.1. Transfers</a> <a href="#ref-for-dom-usbcontroltransferparameters-index②">(2)</a> <a href="#ref-for-dom-usbcontroltransferparameters-index③">(3)</a> <a href="#ref-for-dom-usbcontroltransferparameters-index④">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbintransferresult">
   <b><a href="#usbintransferresult">#usbintransferresult</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbintransferresult">6. Device Usage</a> <a href="#ref-for-usbintransferresult①">(2)</a> <a href="#ref-for-usbintransferresult②">(3)</a> <a href="#ref-for-usbintransferresult③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbintransferresult-data">
   <b><a href="#dom-usbintransferresult-data">#dom-usbintransferresult-data</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbintransferresult-data">6. Device Usage</a> <a href="#ref-for-dom-usbintransferresult-data①">(2)</a> <a href="#ref-for-dom-usbintransferresult-data②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbintransferresult-status">
   <b><a href="#dom-usbintransferresult-status">#dom-usbintransferresult-status</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbintransferresult-status">6. Device Usage</a> <a href="#ref-for-dom-usbintransferresult-status①">(2)</a> <a href="#ref-for-dom-usbintransferresult-status②">(3)</a> <a href="#ref-for-dom-usbintransferresult-status③">(4)</a> <a href="#ref-for-dom-usbintransferresult-status④">(5)</a> <a href="#ref-for-dom-usbintransferresult-status⑤">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbouttransferresult">
   <b><a href="#usbouttransferresult">#usbouttransferresult</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbouttransferresult">6. Device Usage</a> <a href="#ref-for-usbouttransferresult①">(2)</a> <a href="#ref-for-usbouttransferresult②">(3)</a> <a href="#ref-for-usbouttransferresult③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbouttransferresult-byteswritten">
   <b><a href="#dom-usbouttransferresult-byteswritten">#dom-usbouttransferresult-byteswritten</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbouttransferresult-byteswritten">6. Device Usage</a> <a href="#ref-for-dom-usbouttransferresult-byteswritten①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbouttransferresult-status">
   <b><a href="#dom-usbouttransferresult-status">#dom-usbouttransferresult-status</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbouttransferresult-status">6. Device Usage</a> <a href="#ref-for-dom-usbouttransferresult-status①">(2)</a> <a href="#ref-for-dom-usbouttransferresult-status②">(3)</a> <a href="#ref-for-dom-usbouttransferresult-status③">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbisochronousintransferpacket">
   <b><a href="#usbisochronousintransferpacket">#usbisochronousintransferpacket</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbisochronousintransferpacket">6. Device Usage</a>
    <li><a href="#ref-for-usbisochronousintransferpacket①">6.1. Transfers</a> <a href="#ref-for-usbisochronousintransferpacket②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbisochronousintransferpacket-data">
   <b><a href="#dom-usbisochronousintransferpacket-data">#dom-usbisochronousintransferpacket-data</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbisochronousintransferpacket-data">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbisochronousintransferpacket-status">
   <b><a href="#dom-usbisochronousintransferpacket-status">#dom-usbisochronousintransferpacket-status</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbisochronousintransferpacket-status">6. Device Usage</a> <a href="#ref-for-dom-usbisochronousintransferpacket-status①">(2)</a> <a href="#ref-for-dom-usbisochronousintransferpacket-status②">(3)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbisochronousintransferresult">
   <b><a href="#usbisochronousintransferresult">#usbisochronousintransferresult</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbisochronousintransferresult">6. Device Usage</a> <a href="#ref-for-usbisochronousintransferresult①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbisochronousintransferresult-data">
   <b><a href="#dom-usbisochronousintransferresult-data">#dom-usbisochronousintransferresult-data</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbisochronousintransferresult-data">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbisochronousintransferresult-packets">
   <b><a href="#dom-usbisochronousintransferresult-packets">#dom-usbisochronousintransferresult-packets</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbisochronousintransferresult-packets">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbisochronousouttransferpacket">
   <b><a href="#usbisochronousouttransferpacket">#usbisochronousouttransferpacket</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbisochronousouttransferpacket">6. Device Usage</a>
    <li><a href="#ref-for-usbisochronousouttransferpacket①">6.1. Transfers</a> <a href="#ref-for-usbisochronousouttransferpacket②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbisochronousouttransferpacket-byteswritten">
   <b><a href="#dom-usbisochronousouttransferpacket-byteswritten">#dom-usbisochronousouttransferpacket-byteswritten</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbisochronousouttransferpacket-byteswritten">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbisochronousouttransferpacket-status">
   <b><a href="#dom-usbisochronousouttransferpacket-status">#dom-usbisochronousouttransferpacket-status</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbisochronousouttransferpacket-status">6. Device Usage</a> <a href="#ref-for-dom-usbisochronousouttransferpacket-status①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbisochronousouttransferresult">
   <b><a href="#usbisochronousouttransferresult">#usbisochronousouttransferresult</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbisochronousouttransferresult">6. Device Usage</a> <a href="#ref-for-usbisochronousouttransferresult①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbisochronousouttransferresult-packets">
   <b><a href="#dom-usbisochronousouttransferresult-packets">#dom-usbisochronousouttransferresult-packets</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbisochronousouttransferresult-packets">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="control-transfer">
   <b><a href="#control-transfer">#control-transfer</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-control-transfer">4.2. WebUSB Device Requests</a> <a href="#ref-for-control-transfer①">(2)</a>
    <li><a href="#ref-for-control-transfer②">6. Device Usage</a> <a href="#ref-for-control-transfer③">(2)</a> <a href="#ref-for-control-transfer④">(3)</a> <a href="#ref-for-control-transfer⑤">(4)</a> <a href="#ref-for-control-transfer⑥">(5)</a> <a href="#ref-for-control-transfer⑦">(6)</a>
    <li><a href="#ref-for-control-transfer⑧">6.1. Transfers</a>
    <li><a href="#ref-for-control-transfer⑨">9.2. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="setup-stage">
   <b><a href="#setup-stage">#setup-stage</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-setup-stage">6.1. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="setup-packet">
   <b><a href="#setup-packet">#setup-packet</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-setup-packet">6. Device Usage</a>
    <li><a href="#ref-for-setup-packet①">6.1. Transfers</a> <a href="#ref-for-setup-packet②">(2)</a> <a href="#ref-for-setup-packet③">(3)</a> <a href="#ref-for-setup-packet④">(4)</a>
    <li><a href="#ref-for-setup-packet⑤">9.2. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="data-stage">
   <b><a href="#data-stage">#data-stage</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-data-stage">6. Device Usage</a>
    <li><a href="#ref-for-data-stage①">6.1. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="status-stage">
   <b><a href="#status-stage">#status-stage</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-status-stage">6.1. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="check-the-validity-of-the-control-transfer-parameters">
   <b><a href="#check-the-validity-of-the-control-transfer-parameters">#check-the-validity-of-the-control-transfer-parameters</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-check-the-validity-of-the-control-transfer-parameters">6. Device Usage</a> <a href="#ref-for-check-the-validity-of-the-control-transfer-parameters①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbconfiguration">
   <b><a href="#usbconfiguration">#usbconfiguration</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbconfiguration">6. Device Usage</a> <a href="#ref-for-usbconfiguration①">(2)</a>
    <li><a href="#ref-for-usbconfiguration②">6.3. Interfaces</a> <a href="#ref-for-usbconfiguration③">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbconfiguration-configurationvalue">
   <b><a href="#dom-usbconfiguration-configurationvalue">#dom-usbconfiguration-configurationvalue</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbconfiguration-configurationvalue">6.2. Configurations</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbconfiguration-configurationname">
   <b><a href="#dom-usbconfiguration-configurationname">#dom-usbconfiguration-configurationname</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbconfiguration-configurationname">6.2. Configurations</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbconfiguration-interfaces">
   <b><a href="#dom-usbconfiguration-interfaces">#dom-usbconfiguration-interfaces</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbconfiguration-interfaces">6.2. Configurations</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbinterface">
   <b><a href="#usbinterface">#usbinterface</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbinterface">6.2. Configurations</a>
    <li><a href="#ref-for-usbinterface①">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbinterface-interfacenumber">
   <b><a href="#dom-usbinterface-interfacenumber">#dom-usbinterface-interfacenumber</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbinterface-interfacenumber">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbinterface-alternate">
   <b><a href="#dom-usbinterface-alternate">#dom-usbinterface-alternate</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbinterface-alternate">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbinterface-alternates">
   <b><a href="#dom-usbinterface-alternates">#dom-usbinterface-alternates</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbinterface-alternates">6.3. Interfaces</a> <a href="#ref-for-dom-usbinterface-alternates①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbinterface-claimed">
   <b><a href="#dom-usbinterface-claimed">#dom-usbinterface-claimed</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbinterface-claimed">6. Device Usage</a> <a href="#ref-for-dom-usbinterface-claimed①">(2)</a> <a href="#ref-for-dom-usbinterface-claimed②">(3)</a> <a href="#ref-for-dom-usbinterface-claimed③">(4)</a> <a href="#ref-for-dom-usbinterface-claimed④">(5)</a> <a href="#ref-for-dom-usbinterface-claimed⑤">(6)</a> <a href="#ref-for-dom-usbinterface-claimed⑥">(7)</a> <a href="#ref-for-dom-usbinterface-claimed⑦">(8)</a> <a href="#ref-for-dom-usbinterface-claimed⑧">(9)</a> <a href="#ref-for-dom-usbinterface-claimed⑨">(10)</a>
    <li><a href="#ref-for-dom-usbinterface-claimed①⓪">6.1. Transfers</a> <a href="#ref-for-dom-usbinterface-claimed①①">(2)</a>
    <li><a href="#ref-for-dom-usbinterface-claimed①②">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbalternateinterface">
   <b><a href="#usbalternateinterface">#usbalternateinterface</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbalternateinterface">6.3. Interfaces</a> <a href="#ref-for-usbalternateinterface①">(2)</a> <a href="#ref-for-usbalternateinterface②">(3)</a> <a href="#ref-for-usbalternateinterface③">(4)</a> <a href="#ref-for-usbalternateinterface④">(5)</a>
    <li><a href="#ref-for-usbalternateinterface⑤">6.4. Endpoints</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbalternateinterface-alternatesetting">
   <b><a href="#dom-usbalternateinterface-alternatesetting">#dom-usbalternateinterface-alternatesetting</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbalternateinterface-alternatesetting">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbalternateinterface-interfaceclass">
   <b><a href="#dom-usbalternateinterface-interfaceclass">#dom-usbalternateinterface-interfaceclass</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbalternateinterface-interfaceclass">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbalternateinterface-interfacesubclass">
   <b><a href="#dom-usbalternateinterface-interfacesubclass">#dom-usbalternateinterface-interfacesubclass</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbalternateinterface-interfacesubclass">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbalternateinterface-interfaceprotocol">
   <b><a href="#dom-usbalternateinterface-interfaceprotocol">#dom-usbalternateinterface-interfaceprotocol</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbalternateinterface-interfaceprotocol">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbalternateinterface-interfacename">
   <b><a href="#dom-usbalternateinterface-interfacename">#dom-usbalternateinterface-interfacename</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbalternateinterface-interfacename">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbalternateinterface-endpoints">
   <b><a href="#dom-usbalternateinterface-endpoints">#dom-usbalternateinterface-endpoints</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbalternateinterface-endpoints">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="active-configuration">
   <b><a href="#active-configuration">#active-configuration</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-active-configuration">6. Device Usage</a> <a href="#ref-for-active-configuration①">(2)</a> <a href="#ref-for-active-configuration②">(3)</a> <a href="#ref-for-active-configuration③">(4)</a> <a href="#ref-for-active-configuration④">(5)</a> <a href="#ref-for-active-configuration⑤">(6)</a> <a href="#ref-for-active-configuration⑥">(7)</a> <a href="#ref-for-active-configuration⑦">(8)</a> <a href="#ref-for-active-configuration⑧">(9)</a>
    <li><a href="#ref-for-active-configuration⑨">6.1. Transfers</a> <a href="#ref-for-active-configuration①⓪">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-usbdirection">
   <b><a href="#enumdef-usbdirection">#enumdef-usbdirection</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-usbdirection">6. Device Usage</a>
    <li><a href="#ref-for-enumdef-usbdirection①">6.4. Endpoints</a> <a href="#ref-for-enumdef-usbdirection②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdirection-in">
   <b><a href="#dom-usbdirection-in">#dom-usbdirection-in</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdirection-in">6.1. Transfers</a>
    <li><a href="#ref-for-dom-usbdirection-in①">6.4. Endpoints</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbdirection-out">
   <b><a href="#dom-usbdirection-out">#dom-usbdirection-out</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbdirection-out">6.1. Transfers</a>
    <li><a href="#ref-for-dom-usbdirection-out①">6.4. Endpoints</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="enumdef-usbendpointtype">
   <b><a href="#enumdef-usbendpointtype">#enumdef-usbendpointtype</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-enumdef-usbendpointtype">6.4. Endpoints</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbendpoint">
   <b><a href="#usbendpoint">#usbendpoint</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbendpoint">6.3. Interfaces</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbendpoint-endpointnumber">
   <b><a href="#dom-usbendpoint-endpointnumber">#dom-usbendpoint-endpointnumber</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbendpoint-endpointnumber">6.4. Endpoints</a> <a href="#ref-for-dom-usbendpoint-endpointnumber①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbendpoint-direction">
   <b><a href="#dom-usbendpoint-direction">#dom-usbendpoint-direction</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbendpoint-direction">6.4. Endpoints</a> <a href="#ref-for-dom-usbendpoint-direction①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbendpoint-type">
   <b><a href="#dom-usbendpoint-type">#dom-usbendpoint-type</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbendpoint-type">6.4. Endpoints</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbendpoint-packetsize">
   <b><a href="#dom-usbendpoint-packetsize">#dom-usbendpoint-packetsize</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbendpoint-packetsize">6.4. Endpoints</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-usbpermissiondescriptor">
   <b><a href="#dictdef-usbpermissiondescriptor">#dictdef-usbpermissiondescriptor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-usbpermissiondescriptor">5. Device Enumeration</a>
    <li><a href="#ref-for-dictdef-usbpermissiondescriptor①">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbpermissiondescriptor-filters">
   <b><a href="#dom-usbpermissiondescriptor-filters">#dom-usbpermissiondescriptor-filters</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbpermissiondescriptor-filters">5. Device Enumeration</a> <a href="#ref-for-dom-usbpermissiondescriptor-filters①">(2)</a>
    <li><a href="#ref-for-dom-usbpermissiondescriptor-filters②">7.2. Permission API</a> <a href="#ref-for-dom-usbpermissiondescriptor-filters③">(2)</a> <a href="#ref-for-dom-usbpermissiondescriptor-filters④">(3)</a> <a href="#ref-for-dom-usbpermissiondescriptor-filters⑤">(4)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-allowedusbdevice">
   <b><a href="#dictdef-allowedusbdevice">#dictdef-allowedusbdevice</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-allowedusbdevice">7.2. Permission API</a> <a href="#ref-for-dictdef-allowedusbdevice①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-allowedusbdevice-vendorid">
   <b><a href="#dom-allowedusbdevice-vendorid">#dom-allowedusbdevice-vendorid</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-allowedusbdevice-vendorid">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-allowedusbdevice-productid">
   <b><a href="#dom-allowedusbdevice-productid">#dom-allowedusbdevice-productid</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-allowedusbdevice-productid">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-allowedusbdevice-serialnumber">
   <b><a href="#dom-allowedusbdevice-serialnumber">#dom-allowedusbdevice-serialnumber</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-allowedusbdevice-serialnumber">5. Device Enumeration</a>
    <li><a href="#ref-for-dom-allowedusbdevice-serialnumber①">5.1. Events</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dictdef-usbpermissionstorage">
   <b><a href="#dictdef-usbpermissionstorage">#dictdef-usbpermissionstorage</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dictdef-usbpermissionstorage">5. Device Enumeration</a> <a href="#ref-for-dictdef-usbpermissionstorage①">(2)</a> <a href="#ref-for-dictdef-usbpermissionstorage②">(3)</a>
    <li><a href="#ref-for-dictdef-usbpermissionstorage③">5.1. Events</a> <a href="#ref-for-dictdef-usbpermissionstorage④">(2)</a>
    <li><a href="#ref-for-dictdef-usbpermissionstorage⑤">7.2. Permission API</a> <a href="#ref-for-dictdef-usbpermissionstorage⑥">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbpermissionstorage-alloweddevices">
   <b><a href="#dom-usbpermissionstorage-alloweddevices">#dom-usbpermissionstorage-alloweddevices</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbpermissionstorage-alloweddevices">5. Device Enumeration</a> <a href="#ref-for-dom-usbpermissionstorage-alloweddevices①">(2)</a> <a href="#ref-for-dom-usbpermissionstorage-alloweddevices②">(3)</a> <a href="#ref-for-dom-usbpermissionstorage-alloweddevices③">(4)</a>
    <li><a href="#ref-for-dom-usbpermissionstorage-alloweddevices④">5.1. Events</a> <a href="#ref-for-dom-usbpermissionstorage-alloweddevices⑤">(2)</a>
    <li><a href="#ref-for-dom-usbpermissionstorage-alloweddevices⑥">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-allowedusbdevice-devices-slot">
   <b><a href="#dom-allowedusbdevice-devices-slot">#dom-allowedusbdevice-devices-slot</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-allowedusbdevice-devices-slot">5. Device Enumeration</a> <a href="#ref-for-dom-allowedusbdevice-devices-slot①">(2)</a> <a href="#ref-for-dom-allowedusbdevice-devices-slot②">(3)</a> <a href="#ref-for-dom-allowedusbdevice-devices-slot③">(4)</a>
    <li><a href="#ref-for-dom-allowedusbdevice-devices-slot④">5.1. Events</a> <a href="#ref-for-dom-allowedusbdevice-devices-slot⑤">(2)</a> <a href="#ref-for-dom-allowedusbdevice-devices-slot⑥">(3)</a>
    <li><a href="#ref-for-dom-allowedusbdevice-devices-slot⑦">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usbpermissionresult">
   <b><a href="#usbpermissionresult">#usbpermissionresult</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usbpermissionresult">5. Device Enumeration</a>
    <li><a href="#ref-for-usbpermissionresult①">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="dom-usbpermissionresult-devices">
   <b><a href="#dom-usbpermissionresult-devices">#dom-usbpermissionresult-devices</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-dom-usbpermissionresult-devices">5. Device Enumeration</a> <a href="#ref-for-dom-usbpermissionresult-devices①">(2)</a> <a href="#ref-for-dom-usbpermissionresult-devices②">(3)</a> <a href="#ref-for-dom-usbpermissionresult-devices③">(4)</a>
    <li><a href="#ref-for-dom-usbpermissionresult-devices④">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="descriptors">
   <b><a href="#descriptors">#descriptors</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-descriptors">9.1. Descriptors</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="device-descriptor">
   <b><a href="#device-descriptor">#device-descriptor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-device-descriptor">5. Device Enumeration</a> <a href="#ref-for-device-descriptor①">(2)</a>
    <li><a href="#ref-for-device-descriptor②">6. Device Usage</a> <a href="#ref-for-device-descriptor③">(2)</a> <a href="#ref-for-device-descriptor④">(3)</a> <a href="#ref-for-device-descriptor⑤">(4)</a> <a href="#ref-for-device-descriptor⑥">(5)</a>
    <li><a href="#ref-for-device-descriptor⑦">8. Terminology</a> <a href="#ref-for-device-descriptor⑧">(2)</a> <a href="#ref-for-device-descriptor⑨">(3)</a> <a href="#ref-for-device-descriptor①⓪">(4)</a>
    <li><a href="#ref-for-device-descriptor①①">9.1. Descriptors</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="configuration-descriptor">
   <b><a href="#configuration-descriptor">#configuration-descriptor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-configuration-descriptor">6.2. Configurations</a> <a href="#ref-for-configuration-descriptor①">(2)</a> <a href="#ref-for-configuration-descriptor②">(3)</a>
    <li><a href="#ref-for-configuration-descriptor③">8. Terminology</a>
    <li><a href="#ref-for-configuration-descriptor④">9.1. Descriptors</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="interface-descriptor">
   <b><a href="#interface-descriptor">#interface-descriptor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-interface-descriptor">5. Device Enumeration</a> <a href="#ref-for-interface-descriptor①">(2)</a>
    <li><a href="#ref-for-interface-descriptor②">6.2. Configurations</a>
    <li><a href="#ref-for-interface-descriptor③">6.3. Interfaces</a> <a href="#ref-for-interface-descriptor④">(2)</a> <a href="#ref-for-interface-descriptor⑤">(3)</a> <a href="#ref-for-interface-descriptor⑥">(4)</a> <a href="#ref-for-interface-descriptor⑦">(5)</a> <a href="#ref-for-interface-descriptor⑧">(6)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="endpoint-descriptor">
   <b><a href="#endpoint-descriptor">#endpoint-descriptor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-endpoint-descriptor">6.3. Interfaces</a>
    <li><a href="#ref-for-endpoint-descriptor①">6.4. Endpoints</a> <a href="#ref-for-endpoint-descriptor②">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="string-descriptor">
   <b><a href="#string-descriptor">#string-descriptor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-string-descriptor">5. Device Enumeration</a>
    <li><a href="#ref-for-string-descriptor①">6. Device Usage</a>
    <li><a href="#ref-for-string-descriptor②">6.2. Configurations</a>
    <li><a href="#ref-for-string-descriptor③">6.3. Interfaces</a>
    <li><a href="#ref-for-string-descriptor④">8. Terminology</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="binary-object-store">
   <b><a href="#binary-object-store">#binary-object-store</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-binary-object-store">4.1. WebUSB Platform Capability Descriptor</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="platform-descriptor">
   <b><a href="#platform-descriptor">#platform-descriptor</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-platform-descriptor">4.1. WebUSB Platform Capability Descriptor</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="usb-device">
   <b><a href="#usb-device">#usb-device</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-usb-device">5. Device Enumeration</a> <a href="#ref-for-usb-device①">(2)</a>
    <li><a href="#ref-for-usb-device②">5.1. Events</a> <a href="#ref-for-usb-device③">(2)</a>
    <li><a href="#ref-for-usb-device④">7.2. Permission API</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="vendor-id">
   <b><a href="#vendor-id">#vendor-id</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-vendor-id">5. Device Enumeration</a> <a href="#ref-for-vendor-id①">(2)</a>
    <li><a href="#ref-for-vendor-id②">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="product-id">
   <b><a href="#product-id">#product-id</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-product-id">5. Device Enumeration</a> <a href="#ref-for-product-id①">(2)</a>
    <li><a href="#ref-for-product-id②">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="serial-number">
   <b><a href="#serial-number">#serial-number</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-serial-number">5. Device Enumeration</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="out-transfers">
   <b><a href="#out-transfers">#out-transfers</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-out-transfers">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="in-transfers">
   <b><a href="#in-transfers">#in-transfers</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-in-transfers">6. Device Usage</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="bulk-transfers">
   <b><a href="#bulk-transfers">#bulk-transfers</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-bulk-transfers">6. Device Usage</a> <a href="#ref-for-bulk-transfers①">(2)</a>
    <li><a href="#ref-for-bulk-transfers②">9.2. Transfers</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="interrupt-transfers">
   <b><a href="#interrupt-transfers">#interrupt-transfers</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-interrupt-transfers">6. Device Usage</a> <a href="#ref-for-interrupt-transfers①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="isochronous-transfers">
   <b><a href="#isochronous-transfers">#isochronous-transfers</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-isochronous-transfers">6. Device Usage</a> <a href="#ref-for-isochronous-transfers①">(2)</a>
   </ul>
  </aside>
  <aside class="dfn-panel" data-for="default-endpoint">
   <b><a href="#default-endpoint">#default-endpoint</a></b><b>Referenced in:</b>
   <ul>
    <li><a href="#ref-for-default-endpoint">6. Device Usage</a> <a href="#ref-for-default-endpoint①">(2)</a> <a href="#ref-for-default-endpoint②">(3)</a>
    <li><a href="#ref-for-default-endpoint③">6.1. Transfers</a>
   </ul>
  </aside>
<script>/* script-dfn-panel */

document.body.addEventListener("click", function(e) {
    var queryAll = function(sel) { return [].slice.call(document.querySelectorAll(sel)); }
    // Find the dfn element or panel, if any, that was clicked on.
    var el = e.target;
    var target;
    var hitALink = false;
    while(el.parentElement) {
        if(el.tagName == "A") {
            // Clicking on a link in a <dfn> shouldn't summon the panel
            hitALink = true;
        }
        if(el.classList.contains("dfn-paneled")) {
            target = "dfn";
            break;
        }
        if(el.classList.contains("dfn-panel")) {
            target = "dfn-panel";
            break;
        }
        el = el.parentElement;
    }
    if(target != "dfn-panel") {
        // Turn off any currently "on" or "activated" panels.
        queryAll(".dfn-panel.on, .dfn-panel.activated").forEach(function(el){
            el.classList.remove("on");
            el.classList.remove("activated");
        });
    }
    if(target == "dfn" && !hitALink) {
        // open the panel
        var dfnPanel = document.querySelector(".dfn-panel[data-for='" + el.id + "']");
        if(dfnPanel) {
            dfnPanel.classList.add("on");
            var rect = el.getBoundingClientRect();
            dfnPanel.style.left = window.scrollX + rect.right + 5 + "px";
            dfnPanel.style.top = window.scrollY + rect.top + "px";
            var panelRect = dfnPanel.getBoundingClientRect();
            var panelWidth = panelRect.right - panelRect.left;
            if(panelRect.right > document.body.scrollWidth && (rect.left - (panelWidth + 5)) > 0) {
                // Reposition, because the panel is overflowing
                dfnPanel.style.left = window.scrollX + rect.left - (panelWidth + 5) + "px";
            }
        } else {
            console.log("Couldn't find .dfn-panel[data-for='" + el.id + "']");
        }
    } else if(target == "dfn-panel") {
        // Switch it to "activated" state, which pins it.
        el.classList.add("activated");
        el.style.left = null;
        el.style.top = null;
    }

});
</script>